Skip to content

Instantly share code, notes, and snippets.

@doubleedesign
Last active March 7, 2023 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doubleedesign/f6d39ab172876748a4135e3ae7d6a143 to your computer and use it in GitHub Desktop.
Save doubleedesign/f6d39ab172876748a4135e3ae7d6a143 to your computer and use it in GitHub Desktop.
Mixin to display a list of links like label tags
@mixin tags {
ul {
margin: 0;
li {
list-style: none;
display: inline-block;
&:before {
content: '';
background: url(../assets/images/tag.png) no-repeat center left;
background-size: cover;
display: inline-block;
height: 21px;
width: 19px;
float: left;
}
&:hover,
&:focus {
&:before {
background: url(../assets/images/tag-hover.png) no-repeat center left;
}
a {
background: #FFF;
color: $wanderlust;
}
}
a {
font-size: rem-calc(12);
color: #FFF;
background: $wanderlust;
display: inline-block;
height: 21px;
line-height: 19px;
padding-right: rem-calc(5);
padding-left: rem-calc(5);
float: left;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment