Last active
August 29, 2015 14:16
-
-
Save davidicus/5bce2c3de1f5f1fe40ba to your computer and use it in GitHub Desktop.
Use of @at-root to append an element to the front of a class
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
.btn { | |
height: 18px; | |
background: green; | |
line-height: 12px; | |
} | |
a.btn { | |
line-height: 18px; | |
} |
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.12) | |
// Compass (v1.0.3) | |
// ---- | |
.btn { | |
height:18px; | |
background:green; | |
line-height:12px; | |
//If it's attached to a link, make the line height bigger | |
@at-root a#{&} { | |
line-height:18px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment