Commit 78937cbb authored by Mark Otto's avatar Mark Otto Committed by Mark Otto
Browse files

move visibility docs and add .visible mention

parent b7bf3439
Showing with 33 additions and 1 deletion
+33 -1
...@@ -59,7 +59,6 @@ ...@@ -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 @@ ...@@ -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:
......
--- ---
layout: docs layout: docs
title: Invisible content title: Visibility
group: utilities 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. 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 %} {% highlight html %}
<div class="visible">...</div>
<div class="invisible">...</div> <div class="invisible">...</div>
{% endhighlight %} {% endhighlight %}
{% highlight scss %} {% highlight scss %}
// Class // Class
.visible {
visibility: visible;
}
.invisible { .invisible {
visibility: hidden; visibility: hidden;
} }
// Usage as a mixin // Usage as a mixin
.element { .element {
@include invisible; @include invisible(visible);
}
.element {
@include invisible(hidden);
} }
{% endhighlight %} {% endhighlight %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment