Skip to content

Instantly share code, notes, and snippets.

@YohannParis
Created January 30, 2013 19:54
Show Gist options
  • Save YohannParis/4676252 to your computer and use it in GitHub Desktop.
Save YohannParis/4676252 to your computer and use it in GitHub Desktop.
List of all my useful functions I use in my LESS.
.clear {
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
}
.box-sizing {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.border-radius(@topright: 2px, @bottomright: 2px, @bottomleft: 2px, @topleft: 2px) {
-webkit-border-top-right-radius: @topright;
-webkit-border-bottom-right-radius: @bottomright;
-webkit-border-bottom-left-radius: @bottomleft;
-webkit-border-top-left-radius: @topleft;
-moz-border-radius-topright: @topright;
-moz-border-radius-bottomright: @bottomright;
-moz-border-radius-bottomleft: @bottomleft;
-moz-border-radius-topleft: @topleft;
border-top-right-radius: @topright;
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
border-top-left-radius: @topleft;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.hide {
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment