Created
November 8, 2016 21:47
-
-
Save goldhand/16ffe5454e02463e0efae1887becbfd5 to your computer and use it in GitHub Desktop.
Cool pseudo class using the css content attribute. Will before= and after= attributes before and after the element.
This file contains hidden or 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
<p class="pseudo-content" before="“" after="”">You can quote me on this</p> | |
<!-- will render as: | |
"You can quote me on this" | |
--> |
This file contains hidden or 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
.pseudo-content::before { | |
content: attr(before); | |
} | |
.pseudo-content::after { | |
content: attr(after); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment