Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit 308ea27

Browse files
Build: added mixin
1 parent 17baf5e commit 308ea27

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

scss/atoms/typography/_mixins.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// ==========================================================================
2+
// Typography functions
3+
// ==========================================================================
4+
5+
// Adds a single pixel underline (so nice) on retina
6+
// Usage: `@include slime-underline;`
7+
@mixin slim-underline() {
8+
text-decoration: none;
9+
background-image: linear-gradient( to bottom, rgba( 0, 0, 0, 0 ) 75%, #000 50% );
10+
background-repeat: repeat-x;
11+
background-size: 2px 2px;
12+
background-position: 0 em( 22px );
13+
14+
&:hover,
15+
&:active,
16+
&:focus {
17+
background-size: 2px 6px;
18+
background-position: 0 em( 18px );
19+
}
20+
@media not all,
21+
only screen and ( min-resolution: 2dppx ),
22+
only screen and ( -webkit-min-device-pixel-ratio: 2 ) {
23+
background-image: linear-gradient( to bottom, rgba( 0, 0, 0, 0 ) 75%, #000 75% );
24+
background-repeat: repeat-x;
25+
}
26+
}

0 commit comments

Comments
 (0)