Skip to content

Instantly share code, notes, and snippets.

@davidsp
Created March 10, 2014 17:02
Show Gist options
  • Select an option

  • Save davidsp/9469147 to your computer and use it in GitHub Desktop.

Select an option

Save davidsp/9469147 to your computer and use it in GitHub Desktop.
A collection of less mixins
.text-replace() {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
#grid-w {
font-size: 0;
.col-w(@xPerc){
font-size: @baseFontSize;
width: 100%/@xPerc;
letter-spacing: normal;
vertical-align: top;
display: inline-block;
}
}
.margin-clean(){
margin: 0;
padding: 0;
}
.placeholder-color(@colorValue) {
::-webkit-input-placeholder {
color: @colorValue;
}
:-moz-placeholder {
color: @colorValue;
}
::-moz-placeholder {
color: @colorValue;
}
:-ms-input-placeholder {
color: @colorValue;
}
}
.pseudo-styles(@w,@h){
content:'';
display: block;
position: absolute;
width:@w;
height:@h;
}
.extraBorderTop(@color){
&:before{
background-color: @color;
.pseudo-styles(100%,1px);
}
}
.extraBorderBottom(@color,@height){
&:after{
background-color: @color;
.pseudo-styles(100%,@height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment