Created
July 6, 2016 01:50
-
-
Save nukos/7e9cdc3662ccd8d42704fe2839162272 to your computer and use it in GitHub Desktop.
Example: Atomic Design for SCSS
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
@mixin atom-overlay-badges { | |
position: absolute; | |
margin: 0; | |
padding: vr(.2) vr(.3); | |
line-height: vr(1); | |
font-size: modular-scale(-4); | |
font-weight: bold; | |
color: #fff; | |
letter-spacing: vr(.05); | |
text-indent: vr(.05); | |
background: #ccc; | |
border-radius: vr(.1); | |
//override styles | |
@content; | |
} |
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
@import 'atom-overlay-badges'; | |
.component { | |
.badge { | |
@include atom-overlay-badges() { | |
top: vr(-.25); | |
right: vr(-.25); | |
background: #111; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mixinを利用してAtomを作ることにより、extend のようにソースを汚すことなく再利用することができる。