Skip to content

When .LESS is more

@the-border: 1px;
@base-color: #111;

#header {
	color: @base-color * 3;
	border-left: @the-border;
	border-right: @the-border * 2;
}

#footer {
	color: (@base-color + #111) * 1.5;
}

ul
{
	list-style-type: none;
	height: 30px;

	li
	{
		float: left;
		padding-right: 15px;

		a
		{
			padding: 5px;
			display: block;
			color: black;
			text-decoration: none;
		}

		a:hover
		{
			background-color: @menu_color - #222;
		}
	}
}

Curious? 4GuysFromRolla has a nice article about .LESS

btw, if you’re not doing ASP.NET, you can create css from .less by using the command line compiler:

dotless.Compiler.exe -m Styles.less Styles.css

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

@soderlind on Twitter:

Powered by Twitter Tools

Rodney's 404 Handler Plugin plugged in.