Skip to content

Instantly share code, notes, and snippets.

@Ivanopalas
Created August 8, 2016 11:00
Show Gist options
  • Save Ivanopalas/0249656b42a2380de344f6fe7bff2857 to your computer and use it in GitHub Desktop.
Save Ivanopalas/0249656b42a2380de344f6fe7bff2857 to your computer and use it in GitHub Desktop.
Horizontal line around title
h1.has-lines Example Title
$lines--content-gutter: 20px;
$lines--min-width: 20px;
.has-lines {
display: flex;
align-items: center;
text-align: center;
// IE10
justify-content: center;
&:before
&:after {
content: '';
flex-grow: 1;
height: 1px;
background: #ccc;
min-width: $lines--min-width;
// IE10
display: inline-block;
// IE9
vertical-align: middle;
}
&:before {
margin-right: $lines--content-gutter;
}
&:after {
margin-left: $lines--content-gutter;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment