Skip to content

Instantly share code, notes, and snippets.

@jonbrockett
Created October 3, 2017 15:26
Show Gist options
  • Save jonbrockett/074633ff46d8e673c2ad9cc6cd76a7ed to your computer and use it in GitHub Desktop.
Save jonbrockett/074633ff46d8e673c2ad9cc6cd76a7ed to your computer and use it in GitHub Desktop.
Line on Sides Heading
h2 {
overflow: hidden;
text-align: center;
&:before, &:after {
background-color: $color; //Color of the line
content: "";
display: inline-block;
height: .2rem; //Size of the line
position: relative;
vertical-align: middle;
width: 50%;
}
&:before {
right: 4.5rem; //Right padding between the line and heading
margin-left: -50%;
}
&:after {
left: 4.5rem; //Left padding between the line and heading
margin-right: -50%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment