Last active
August 29, 2015 14:03
-
-
Save aaronmcadam/db190388610c70f63c82 to your computer and use it in GitHub Desktop.
Adding hover and active styles with pseudo-elements.
This file contains hidden or 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
&:hover { | |
position: relative; | |
&:before { | |
content: " "; | |
height: 24px; | |
width: 24px; | |
left: 0; | |
top: 0; | |
position: absolute; | |
background: $header_background_colour; | |
opacity: 0.3; | |
} | |
} | |
&:active { | |
position: relative; | |
&:before { | |
content: " "; | |
height: 24px; | |
width: 24px; | |
left: 0; | |
top: 0; | |
position: absolute; | |
background: black; | |
opacity: 0.3; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment