Created
November 26, 2012 20:59
-
-
Save zamoose/4150576 to your computer and use it in GitHub Desktop.
LESS
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
/* | |
New and improved solution, available in a master LESS file for use anywhere. | |
*/ | |
.setwidth(@width, @defaultw) when (isnumber(@width)){ | |
width: @width; | |
} | |
.setwidth(@width, @defaultw) when not(isnumber(@width)){ | |
width: @defaultw; | |
} | |
/* | |
Then, the layout stylesheet. | |
*/ | |
#container{.setwidth(@containerwidth, 960px);margin:0 auto;} | |
#primarysb{.setwidth(@primarysbwidth, 350px);float:left;} | |
#secondarysb{.setwidth(@secondarysbwidth, 350px);float:right;} | |
#footer{.setwidth(@footerwidth, 100%);clear:both;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice one :)