Skip to content

Instantly share code, notes, and snippets.

@goldhand
Created November 8, 2016 21:47
Show Gist options
  • Save goldhand/16ffe5454e02463e0efae1887becbfd5 to your computer and use it in GitHub Desktop.
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.
<p class="pseudo-content" before="&#8220;" after="&#8221;">You can quote me on this</p>
<!-- will render as:
"You can quote me on this"
-->
.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