Last active
January 24, 2017 13:31
-
-
Save Blumed/76af1b7685c5f485e4ea9beba33a7030 to your computer and use it in GitHub Desktop.
CSS: Inline links/text with dividers
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
//Inline Divides | |
//------------------------ | |
.is-inline { | |
font-size: 0; | |
} | |
.is-inline > * { | |
display: inline-block; | |
position: relative; | |
} | |
.is-inline > * > * { | |
color: currentColor; | |
} | |
.is-inline > * + * { | |
margin-left: 24px; | |
} | |
.is-inline > * + *:before { | |
content: ""; | |
height: 14px; | |
width: 2px; | |
margin-top: -7px; | |
position: absolute; | |
top: 50%; | |
left: -12px; | |
background-color: currentColor; | |
} | |
.no-divide:before { | |
width: 0; | |
} | |
@include small { | |
.is-inline > * { | |
display: block; | |
} | |
.is-inline > * + * { | |
margin-left: 0; | |
} | |
.is-inline > * + *:before { | |
margin: 0; | |
width: 0; | |
position: relative; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment