Improved hide-text mixin performance and accessibility, closes #743
This commit is contained in:
parent
92181e074f
commit
f1187ba44e
@ -26,9 +26,7 @@
|
||||
|
||||
// Hides text in an element so you can see the background.
|
||||
@mixin hide-text {
|
||||
$approximate_em_value: 12px / 1em;
|
||||
$wider_than_any_screen: -9999em;
|
||||
text-indent: $wider_than_any_screen * $approximate_em_value;
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
font: 0/0 serif;
|
||||
text-shadow: none;
|
||||
color: transparent;
|
||||
}
|
||||
|
@ -773,18 +773,18 @@ class SpritesTest < Test::Unit::TestCase
|
||||
background:url('/colors-s58671cb5bb.png') no-repeat;
|
||||
}
|
||||
.blue {
|
||||
text-indent:-119988px;
|
||||
overflow:hidden;
|
||||
text-align:left;
|
||||
font: 0/0 serif;
|
||||
text-shadow: none;
|
||||
color: transparent;
|
||||
background-position:0 0;
|
||||
background-image:url('/colors-s58671cb5bb.png');
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
text-indent:-119988px;
|
||||
overflow:hidden;
|
||||
text-align:left;
|
||||
font: 0/0 serif;
|
||||
text-shadow: none;
|
||||
color: transparent;
|
||||
background-position:0 -10px;
|
||||
height:10px;
|
||||
width:10px;
|
||||
|
Loading…
Reference in New Issue
Block a user