mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +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).
|
Necessary for following [accessibility best practices]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/#accessibility).
|
||||||
{%- endcomment -%}
|
{%- endcomment -%}
|
||||||
|
|
||||||
{% highlight html %}
|
{% example html %}
|
||||||
<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
|
<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
|
||||||
{% endhighlight %}
|
{% endexample %}
|
||||||
|
|
||||||
{% highlight scss %}
|
{% highlight scss %}
|
||||||
// Usage as a mixin
|
// Usage as a mixin
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
clip: rect(0, 0, 0, 0);
|
clip: rect(0, 0, 0, 0);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
clip-path: inset(50%);
|
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,6 +29,5 @@
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
clip: auto;
|
clip: auto;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
clip-path: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user