Skip to content
Draft
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
10 changes: 7 additions & 3 deletions src/scss/abstracts/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,26 @@
}

// Makes an element visually hidden, but accessible.
// @see http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
// Modified from https://css-tricks.com/inclusively-hidden/.
@mixin element-invisible {
position: absolute !important;
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap;
width: 1px;
}

// Turns off the element-invisible effect.
@mixin element-invisible-off {
position: static !important;
clip: auto;
clip-path: none;
height: auto;
width: auto;
overflow: auto;
white-space: normal;
}

// Makes an element visually hidden by default, but visible when focused.
Expand Down