Created
November 29, 2016 07:55
-
-
Save indreklasn/b2257658800802a4dc545ef6f921f612 to your computer and use it in GitHub Desktop.
Use attribute selectors with empty links
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
/* if a hyperlink doesn’t have a text value, i.e., it rendered empty, insert the href value in its place: */ | |
a[href]:empty::before { | |
content: attr(href); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment