Created
November 18, 2016 20:24
-
-
Save carl0zen/89edc1dd4bc87f129cf62233672e1536 to your computer and use it in GitHub Desktop.
Local Modules styles example
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
@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