Last active
September 5, 2016 17:11
-
-
Save gemmadlou/a8e46681824fe8c95bf11b8726e51713 to your computer and use it in GitHub Desktop.
Inline Text Background Solution
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
.c-slab-text { | |
padding: 0.3em 0; | |
position: relative; | |
padding-left: 20px; | |
overflow: hidden; | |
&:before { | |
content: ' '; | |
position: absolute; | |
top: -2px; | |
left: 0; | |
bottom: 0; | |
background-color: black; | |
width: 20px; | |
display: block; | |
} | |
&__inner { | |
display: inline; | |
background-color: black; | |
padding: 0.6em 0; | |
padding-right: 10px; | |
} | |
&__inner__element { | |
position: relative; | |
color: white; | |
left: -10px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment