Created
October 26, 2012 16:56
-
-
Save ganglio/3959897 to your computer and use it in GitHub Desktop.
SCSS: Ruler Mixin
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
@mixin ruler($width:50px,$height:10px) { | |
background: { | |
color: black; | |
clip: content-box; | |
} | |
border: { | |
width: $height 1px; | |
style: solid; | |
color: transparent black; | |
}; | |
height: $height * 2 + 1px; | |
width: $width; | |
@include box-sizing(border-box); | |
&:after { | |
content: "#{$width}"; | |
display: block; | |
font { | |
family: Verdana; | |
size: 8px; | |
} | |
text-align: center; | |
width: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment