Last active
August 29, 2015 13:57
-
-
Save pagelab/9505888 to your computer and use it in GitHub Desktop.
Sass: Silent extendables
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
h1, article .title, footer .big-deal h2 { | |
font-size: 2rem; | |
line-height: 1.75; | |
} | |
h2 { | |
font-size: 1.5rem; | |
line-height: 1.5; | |
} | |
aside h1 { | |
color: #bada55; | |
font-size: 1.25rem; | |
} |
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.2.9) | |
// Compass (v) | |
// ---- | |
%h1 { | |
font-size: 2rem; | |
line-height: 1.75; | |
} | |
%h2 { | |
font-size: 1.5rem; | |
line-height: 1.5; | |
} | |
h1 { | |
@extend %h1; | |
} | |
h2 { | |
@extend %h2; | |
} | |
article { | |
.title { | |
@extend %h1; | |
} | |
} | |
aside { | |
h1 { | |
color: #bada55; | |
font-size: 1.25rem; | |
} | |
} | |
footer { | |
.big-deal { | |
h2 { | |
@extend %h1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment