mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-28 10:24:19 +01:00
Update .sr-only
mixin and utility (#25197)
* Remove clip-path from .sr-only utility as it causes perf regressions in Chrome * change snippet to example
This commit is contained in:
parent
e373fbea92
commit
98111214c2
@ -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
|
||||
|
@ -11,7 +11,6 @@
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
clip-path: inset(50%);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@ -30,6 +29,5 @@
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
white-space: normal;
|
||||
clip-path: none;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user