Skip to content

Instantly share code, notes, and snippets.

@carl0zen
Created November 18, 2016 20:24
Show Gist options
  • Save carl0zen/89edc1dd4bc87f129cf62233672e1536 to your computer and use it in GitHub Desktop.
Save carl0zen/89edc1dd4bc87f129cf62233672e1536 to your computer and use it in GitHub Desktop.
Local Modules styles example
@import '~tools/theme';
:local(.root) {
border: 1px solid;
font-family: inherit;
font-size: 12px;
color: inherit;
background: none;
cursor: pointer;
display: inline-block;
text-transform: uppercase;
letter-spacing: 0;
font-weight: 700;
outline: none;
position: relative;
transition: all 0.3s;
text-transform: uppercase;
padding: 10px 20px;
margin: 0;
border-radius: 3px;
text-align: center;
}
@mixin button($bg-color, $font-color) {
background: $bg-color;
color: $font-color;
border-color: $font-color;
&:focus {
border-color: $font-color;
background: $bg-color;
color: $font-color;
}
&:hover {
color: $font-color;
background: lighten($bg-color, 20%);
}
&:active {
background: lighten($bg-color, 30%);
top: 2px;
}
}
:local(.primary) {
@include button($color-primary, $color-white)
}
:local(.secondary) {
@include button($color-white, $color-primary)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment