Skip to content
Merged
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions scss/mixins/_screen-reader.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Only display content to screen readers
//
// See: http://a11yproject.com/posts/how-to-hide-content
// See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/

@mixin sr-only {
position: absolute;
Expand All @@ -9,7 +10,9 @@
padding: 0;
margin: -1px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we drop the margin: -1px? I don't see it in Hugo's post and I know we had an issue with it on GitHub causing a horizontal scrollbar with that.

overflow: hidden;
white-space: nowrap;
clip: rect(0,0,0,0);
clip-path: inset(50%);
border: 0;
}

Expand All @@ -27,6 +30,8 @@
height: auto;
margin: 0;
overflow: visible;
white-space: normal;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered position, width, height, margin, overflow, clip, white-space, clip-path

clip: auto;
clip-path: none;
}
}