Skip to content

Commit

Permalink
Update .sr-only mixin and utility (#25197)
Browse files Browse the repository at this point in the history
* Remove clip-path from .sr-only utility as it causes perf regressions in Chrome

* change snippet to example
  • Loading branch information
mdo authored Feb 11, 2018
1 parent e373fbe commit 9811121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/4.0/utilities/screenreaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Hide an element to all devices **except screen readers** with `.sr-only`. Combin
Necessary for following [accessibility best practices]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/#accessibility).
{%- endcomment -%}

{% highlight html %}
{% example html %}
<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
{% endhighlight %}
{% endexample %}

{% highlight scss %}
// Usage as a mixin
Expand Down
2 changes: 0 additions & 2 deletions scss/mixins/_screen-reader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
clip-path: inset(50%);
border: 0;
}

Expand All @@ -30,6 +29,5 @@
overflow: visible;
clip: auto;
white-space: normal;
clip-path: none;
}
}

0 comments on commit 9811121

Please sign in to comment.