Last active
December 16, 2015 13:38
-
-
Save csswizardry/d2ec30844c93f41a8f54 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#0" class="c-btn"> | |
<span class="c-btn__text">Close</span> | |
</a> | |
<hr /> | |
<a href="#0" class="c-btn is-icon"> | |
<span class="c-btn__icon">X</span> | |
<span class="c-btn__text">Close</span> | |
</a> | |
<hr /> | |
<a href="#0" class="c-btn"> | |
<span class="c-btn__icon">X</span> | |
<span class="c-btn__text">Close</span> | |
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.20) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin hide($style: 'physically') { | |
@if ($style == 'physically') { | |
display: none; | |
} @elseif ($style == 'visually') { | |
visibility: hidden; | |
} @elseif ($style == 'accessibly') { | |
position: absolute !important; | |
width: 1px; | |
height: 1px; | |
overflow: hidden; | |
clip: rect(1px, 1px, 1px, 1px); | |
} | |
} | |
.c-btn { | |
&.is-icon .c-btn__text { | |
@include hide('accessibly'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.c-btn.is-icon .c-btn__text { | |
position: absolute !important; | |
width: 1px; | |
height: 1px; | |
overflow: hidden; | |
clip: rect(1px, 1px, 1px, 1px); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#0" class="c-btn"> | |
<span class="c-btn__text">Close</span> | |
</a> | |
<hr /> | |
<a href="#0" class="c-btn is-icon"> | |
<span class="c-btn__icon">X</span> | |
<span class="c-btn__text">Close</span> | |
</a> | |
<hr /> | |
<a href="#0" class="c-btn"> | |
<span class="c-btn__icon">X</span> | |
<span class="c-btn__text">Close</span> | |
</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment