mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
move visibility docs and add .visible mention
This commit is contained in:
parent
b7bf343958
commit
78937cbb39
@ -59,7 +59,6 @@
|
|||||||
- title: Display
|
- title: Display
|
||||||
- title: Flexbox
|
- title: Flexbox
|
||||||
- title: Image replacement
|
- title: Image replacement
|
||||||
- title: Invisible content
|
|
||||||
- title: Position
|
- title: Position
|
||||||
- title: Responsive helpers
|
- title: Responsive helpers
|
||||||
- title: Screenreaders
|
- title: Screenreaders
|
||||||
@ -67,6 +66,7 @@
|
|||||||
- title: Spacing
|
- title: Spacing
|
||||||
- title: Typography
|
- title: Typography
|
||||||
- title: Vertical align
|
- title: Vertical align
|
||||||
|
- title: Visibility
|
||||||
|
|
||||||
- title: Extend
|
- title: Extend
|
||||||
pages:
|
pages:
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
layout: docs
|
|
||||||
title: Invisible content
|
|
||||||
group: utilities
|
|
||||||
---
|
|
||||||
|
|
||||||
The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document.
|
|
||||||
|
|
||||||
{% highlight html %}
|
|
||||||
<div class="invisible">...</div>
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
{% highlight scss %}
|
|
||||||
// Class
|
|
||||||
.invisible {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Usage as a mixin
|
|
||||||
.element {
|
|
||||||
@include invisible;
|
|
||||||
}
|
|
||||||
{% endhighlight %}
|
|
32
docs/utilities/visibility.md
Normal file
32
docs/utilities/visibility.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
layout: docs
|
||||||
|
title: Visibility
|
||||||
|
group: utilities
|
||||||
|
---
|
||||||
|
|
||||||
|
Set the `visibility` of elements with our visibility utilities. These do not modify the `display` value at all and are helpful for hiding content from most users, but still keeping them for screen readers.
|
||||||
|
|
||||||
|
Apply `.visible` or `.invisible` as needed.
|
||||||
|
|
||||||
|
{% highlight html %}
|
||||||
|
<div class="visible">...</div>
|
||||||
|
<div class="invisible">...</div>
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
{% highlight scss %}
|
||||||
|
// Class
|
||||||
|
.visible {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
.invisible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Usage as a mixin
|
||||||
|
.element {
|
||||||
|
@include invisible(visible);
|
||||||
|
}
|
||||||
|
.element {
|
||||||
|
@include invisible(hidden);
|
||||||
|
}
|
||||||
|
{% endhighlight %}
|
Loading…
x
Reference in New Issue
Block a user