Last active
August 29, 2015 14:02
-
-
Save thisislawatts/b166c73d1f862b5c0a84 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
///////////////////// | |
// | |
// Atomic Styles | |
// | |
// Useful for little interventions | |
// | |
///////////////////// | |
.fl {float: left} | |
.fr { | |
float: right; | |
clear: right; | |
} | |
.tac { | |
text-align: center; | |
} | |
.tar { | |
text-align: right | |
} | |
.strike { | |
text-decoration: line-through; | |
} | |
@include breakpoint( $breakpoint_palm_max ) { | |
.palm__m0 {margin: 0} | |
} | |
.m-a { margin: 0 auto } | |
// Hide only visually, but have it available for screenreaders: h5bp.com/v */ | |
@mixin vh() { | |
border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; | |
} | |
.vh { @include vh(); } | |
// Extends the .vh class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ | |
.vh.focusable:active, .vh.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } | |
@include breakpoint( $breakpoint_palm ) { | |
.palm--only { | |
@include vh(); | |
} | |
} | |
@include breakpoint( $breakpoint_palm_max ) { | |
.palm--hidden { | |
@include vh(); | |
} | |
} | |
.bgsc { | |
background-position: center center; | |
@include background-size(cover); | |
} | |
.vh__100 { | |
@include breakpoint( $breakpoint_palm ) { | |
height: 100vh; | |
} | |
} | |
.vh__120 { | |
height: 120vh; | |
} | |
.vh__128 { | |
height: 128vh; | |
} | |
/** | |
* For modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* contenteditable attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that are clearfixed. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. | |
*/ | |
.cf:before, | |
.cf:after { | |
content: " "; /* 1 */ | |
display: table; /* 2 */ | |
} | |
.cf:after { | |
clear: both; | |
} | |
/** | |
* For IE 6/7 only | |
* Include this rule to trigger hasLayout and contain floats. | |
*/ | |
.cf { | |
*zoom: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment