Created
January 31, 2015 00:57
-
-
Save jackrugile/65829cf38ea8f8d8ebd6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
/* | |
The item class is sometimes a <div>, and sometimes an <a>. | |
I'd like to only set a hover effect when it's an <a>. | |
Id there a way to utilize the ampersand and | |
nested syntax to achieve this? | |
What I have below is what I want in theory, but it's invalid. | |
*/ | |
.item { | |
background: tomato; | |
display: block; | |
a&:hover { | |
background: dodgerblue; | |
} | |
} |
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
Invalid CSS after " a": expected "{", was "&:hover {" | |
"&:hover" may only be used at the beginning of a compound selector. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment