Skip to content

Commit

Permalink
docs(utilities): add 'Visibility' page (#2651)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored Aug 1, 2024
1 parent c85f6dd commit ae35e83
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
31 changes: 30 additions & 1 deletion site/content/docs/0.0/utilities/visibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,33 @@ aliases:
- "/docs/utilities/visibility/"
---

{{< callout-soon "page" >}}
Set the `visibility` of elements with our visibility utilities. These utility classes do not modify the `display` value at all and do not affect layout – `.invisible` elements still take up space in the page.

{{< callout warning >}}
Elements with the `.invisible` class will be hidden *both* visually and for assistive technology/screen reader users.
{{< /callout >}}

Apply `.visible` or `.invisible` as needed.

```html
<div class="visible">...</div>
<div class="invisible">...</div>
```

```scss
// Class
.visible {
visibility: visible !important;
}
.invisible {
visibility: hidden !important;
}
```

## CSS

### Sass utilities API

Visibility utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}})

{{< scss-docs name="utils-visibility" file="scss/_utilities.scss" >}}
1 change: 0 additions & 1 deletion site/data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@
- title: Vertical align
draft: true
- title: Visibility
draft: true
- title: Z-index
draft: true

Expand Down

0 comments on commit ae35e83

Please sign in to comment.