Created
July 25, 2015 06:13
-
-
Save geckotang/afed79f7d552937e8333 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.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
/* box */ | |
.my-box { | |
padding: 10px; | |
border-width: 3px; | |
border-style: solid; | |
&.is-error { | |
border-color: red; | |
} | |
&.is-current { | |
border-color: green; | |
} | |
} | |
/* input */ | |
.my-input { | |
$box: ".my-box"; | |
//.parent.errorの時の、.inputの状態 | |
#{$box}.is-error &{ | |
background-color: red; | |
} | |
#{$box}.is-current &{ | |
background-color: green; | |
} | |
} |
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
/* box */ | |
.my-box { | |
padding: 10px; | |
border-width: 3px; | |
border-style: solid; | |
} | |
.my-box.is-error { | |
border-color: red; | |
} | |
.my-box.is-current { | |
border-color: green; | |
} | |
/* input */ | |
.my-box.is-error .my-input { | |
background-color: red; | |
} | |
.my-box.is-current .my-input { | |
background-color: green; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment