Unverified Commit 98111214 authored by Mark Otto's avatar Mark Otto Committed by GitHub
Browse files

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
parent e373fbea
4 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!23207#22402 : modal: new autofocus & keyboardBtnNav options,!17021v4
Showing with 2 additions and 4 deletions
+2 -4
......@@ -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;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment