Skip to content

Instantly share code, notes, and snippets.

@hsleewis
Created August 15, 2014 10:40
Show Gist options
  • Save hsleewis/20ed5f315ff236e30653 to your computer and use it in GitHub Desktop.
Save hsleewis/20ed5f315ff236e30653 to your computer and use it in GitHub Desktop.
// example1: ACTIVE AND HOVER STATE
a.error {
border: 1px solid #c6c6c6;
color: white;
&:hover {
background: #FA4549;
}
&:active {
background: #E30F1A;
}
}
//example 2: RESPONSIVE
.blog-title {
text-align: right;
font-size: 1.8em;
@include smaller-than( medium ){
font-size: 1.3em;
}
}
//example 2 uses this mixin:
@mixin smaller-than( $name ) {
@if( $MQs == true ){
@if( $name == large ){
@media (max-width: 923px ){ @content; } }
@if( $name == medium ){
@media (max-width: 950px ){ @content; } }
@if( $name == small ){
@media (max-width: 550px ){ @content; } }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment