mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-10 03:46:13 +01:00
b46f05a948
This commit includes all the needed workarounds and most changes from the main branch for everything to work, like: * removing empty lines in raw HTML that break output * read .browserslistrc, CSS variables from disk instead of duplicating it * using Hugo mounts * using Hugo for the docs CSS/JS * move ToC Sass code to a separate file while adapting it for Hugo Thus, this patch makes our npm scripts faster since lint runs on one step and there's no separate docs assets processing.
35 lines
914 B
Markdown
35 lines
914 B
Markdown
---
|
||
layout: docs
|
||
title: Visibility
|
||
description: Control the visibility, without modifying the display, of elements with visibility utilities.
|
||
group: utilities
|
||
---
|
||
|
||
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. Content will be hidden both visually and for assistive technology/screen reader users.
|
||
|
||
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;
|
||
}
|
||
|
||
// Usage as a mixin
|
||
// Warning: The `invisible()` mixin has been deprecated as of v4.3.0. It will be removed entirely in v5.
|
||
.element {
|
||
@include invisible(visible);
|
||
}
|
||
.element {
|
||
@include invisible(hidden);
|
||
}
|
||
```
|