Skip to content

Instantly share code, notes, and snippets.

@Dare-NZ
Last active December 17, 2015 00:49
Show Gist options
  • Save Dare-NZ/5523555 to your computer and use it in GitHub Desktop.
Save Dare-NZ/5523555 to your computer and use it in GitHub Desktop.
A couple of indespensible LESS functions for tedious CSS jobs
.hList {
list-style:none;
margin:0;
padding:0;
li {
margin:0;
padding:0;
display:inline-block;
*display:inline;
}
}
.absPos(@dSide: 0px, @dVert: 0px, @width:10px, @height: 10px, @side: left, @vert: top, @zIndex: 10) {
position:absolute;
.pv(@side, @dSide);
.pv(@vert, @dVert);
width:@width;
height:@height;
z-index:@zIndex;
}
.absImg(@dSide: 0px, @dVert: 0px, @width:10px, @height: 10px, @src: '../img/logo.png', @side: left, @vert: top, @zIndex: 10, @repeat: no-repeat) {
.absPos(@dSide, @dVert, @width, @height, @side, @vert, @zIndex);
background:url(@src) center @repeat;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment