Last active
December 30, 2015 12:29
-
-
Save blackfalcon/7829866 to your computer and use it in GitHub Desktop.
Create UI badge using data attributes and CSS for content
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
<a href="#" rel="docs" data-notification="3">docs</a> |
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
$echo_primary: #FF6625; | |
[data-notification] { | |
&:after { | |
display: block; | |
text-align: center; | |
content: attr(data-notification); | |
width: 40px; | |
height: 40px; | |
line-height: 40px; | |
border-radius: 50%; | |
background-color: $echo_primary; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment