Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OUDS] docs(utilities): add 'Visibility' page #2651

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading