Skip to content

Instantly share code, notes, and snippets.

@cycold
Created July 31, 2014 09:29
Show Gist options
  • Save cycold/5c7e6049bb8b6e4213d5 to your computer and use it in GitHub Desktop.
Save cycold/5c7e6049bb8b6e4213d5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="div visuallyhidden">
asdasd
</div>
// ----
// Sass (v3.3.12)
// Compass (v1.0.0.alpha.21)
// ----
$list:#111,#222,#333;
@function pxToem($px,$base:16){
@return ( $px / $base ) * 1em
};
.div{
width:percentage(10px/20px);
height:10*20px;
min-width:length($list);
color:nth($list,2);
line-height: pxToem(20);
background:darken(#f90,10%);
}
/* Hide only visually, but have it available for screenreaders*/
.visuallyhidden {
border: 0 none !important;
clip: rect(1px 1px 1px 1px);/*IE<8*/
clip: rect(1px,1px,1px,1px);
height: 1px !important;
margin: -1px;
overflow: hidden;
padding: 0 !important;
position: absolute !important;
width: 1px;
}
.div {
width: 50%;
height: 200px;
min-width: 3;
color: #222222;
line-height: 1.25em;
background: #cc7a00;
}
/* Hide only visually, but have it available for screenreaders*/
.visuallyhidden {
border: 0 none !important;
clip: rect(1px 1px 1px 1px);
/*IE<8*/
clip: rect(1px, 1px, 1px, 1px);
height: 1px !important;
margin: -1px;
overflow: hidden;
padding: 0 !important;
position: absolute !important;
width: 1px;
}
<div class="div visuallyhidden">
asdasd
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment