Skip to content

Instantly share code, notes, and snippets.

@geckotang
Created July 25, 2015 06:13
Show Gist options
  • Save geckotang/afed79f7d552937e8333 to your computer and use it in GitHub Desktop.
Save geckotang/afed79f7d552937e8333 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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;
}
}
/* 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