Last active
January 23, 2018 14:25
-
-
Save marlenesco/2298c9066d8e29b04599d59c2c1baec2 to your computer and use it in GitHub Desktop.
Bootstrap text stripe
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
.text-stripe { | |
position: relative; | |
&:before { | |
position: absolute; | |
content: ""; | |
left: -0.1em; | |
top: 50%; | |
right: -0.1em; | |
border-top: .09em solid; | |
border-color: inherit; | |
-webkit-transform:rotate(-8deg); | |
-moz-transform:rotate(-8deg); | |
-ms-transform:rotate(-8deg); | |
-o-transform:rotate(-8deg); | |
transform:rotate(-8deg); | |
} | |
&.stripe-reverse:before { | |
-webkit-transform:rotate(8deg); | |
-moz-transform:rotate(8deg); | |
-ms-transform:rotate(8deg); | |
-o-transform:rotate(8deg); | |
transform:rotate(8deg); | |
} | |
&.stripe-danger:before { | |
border-color: @brand-danger; | |
} | |
&.stripe-success:before { | |
border-color: @brand-success; | |
} | |
&.stripe-info:before { | |
border-color: @brand-info; | |
} | |
&.stripe-primary:before { | |
border-color: @brand-primary; | |
} | |
&.stripe-warning:before { | |
border-color: @brand-warning; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
<p class="lead">This is an example of a <span class="text-stripe">striped text</span> in a paragraph.</p>
<p class="lead">Another example of a <span class="text-stripe stripe-danger">striped text</span> in a paragraph.</p>
<p class="lead">Another one <span class="text-stripe stripe-reverse stripe-info">striped text</span> in a paragraph.</p>
<p class="lead">And last one <span class="text-stripe text-info stripe-success">striped text</span> in a paragraph.</p>
That's all folks