Created
June 16, 2014 15:45
-
-
Save bfillmer/ece4e9dd7e942312847d to your computer and use it in GitHub Desktop.
Generic LESS Mixins
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
// Liked what Chris Coyier showed off in this blog post: | |
// http://codepen.io/chriscoyier/blog/some-mini-sass-mixins-i-like | |
// Decided to make LESS versions really quickly. | |
.coverer() { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
.centerer() { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} | |
.word-wrap() { | |
word-break: break-word; | |
-webkit-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} | |
.ellipsis() { | |
overflow: hidden; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
} | |
.black(@opacity) { | |
@black: rgba(0, 0, 0, @opacity); | |
} | |
.white(@opacity) { | |
@white: rgba(255, 255, 255, @opacity); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment