Skip to content

Instantly share code, notes, and snippets.

@vergissberlin
Created July 1, 2015 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vergissberlin/62785dac0e9c0b0bf0cf to your computer and use it in GitHub Desktop.
Save vergissberlin/62785dac0e9c0b0bf0cf to your computer and use it in GitHub Desktop.
CSS Chaining
// ----
// libsass (v3.2.5)
// ----
.btn,
[class*="btn-"],
[class*=" btn-"] {
display: inline-block;
font-weight: 500;
text-align: center;
vertical-align: middle;
cursor: pointer;
&:hover,
&:focus {
color: #eee;
text-decoration: none;
}
&[disabled],
fieldset[disabled] & {
cursor: disabled;
opacity: .65;
}
}
// Button brands
.btn-sneap {
background-color: #189;
color: #fff;
}
.btn-fire {
background-color: #a00;
color: #333;
}
// Button variant
.btn-rounded {
border-radius: 4px;
}
.btn,
[class*="btn-"],
[class*=" btn-"] {
display: inline-block;
font-weight: 500;
text-align: center;
vertical-align: middle;
cursor: pointer;
}
.btn:hover,
.btn:focus,
[class*="btn-"]:hover,
[class*="btn-"]:focus,
[class*=" btn-"]:hover,
[class*=" btn-"]:focus {
color: #eee;
text-decoration: none;
}
.btn[disabled],
fieldset[disabled] .btn,
[class*="btn-"][disabled],
fieldset[disabled] [class*="btn-"],
[class*=" btn-"][disabled],
fieldset[disabled] [class*=" btn-"] {
cursor: disabled;
opacity: .65;
}
.btn-sneap {
background-color: #189;
color: #fff;
}
.btn-fire {
background-color: #a00;
color: #333;
}
.btn-rounded {
border-radius: 4px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment