4 December 2009 3:47p Pacific

{less} CSS for .Net

by Matt Sherman

A while back I asked whether some enterprising-person-who-is-smarter-than-I would offer a version of the {less} CSS framework for .Net. Looks like they have, and they did it as I’d hoped: an HttpHandler mapped to the .less extension. So your .less files are compiled on the fly and served to the browser as plain ol’ CSS.

In brief, {less} is a syntax for CSS that allows for programmability and reusability. Define a color (or a whole set of CSS properties) in one place, and refer to them throughout. Makes global changes easy and makes your CSS much more concise. Heck, one wonders why CSS isn’t already like that.

And today Phil Haack offers another option: {less} compilation as a T4 template. The upside of that approach is that CSS files are created locally, right in Visual Studio. So you can deploy them to any server. It would help debugging, too.

Comments

5 December 2009 12:12p Pacific #

trackback
Social comments and analytics for this post

This post was mentioned on Hackernews by vyrotek: haacked.com/.../t4-template-for-less-c...

uberVU - social comments |

Comments are closed

Tell others

TwitterTweet this page
Digg!Digg this page
TwitterAdd to Google Reader

Experimental! Let me know how it works for you.

Shorten this page's URL

Learn more about the TinyASP URL shortener

ASP.Net jQuery Controls

Implement jQuery effects using familiar ASP.Net server controls. Learn more...

Recent posts

Avoiding “magic strings” in jQuery, C# and ASP.net MVC

Alikewise learnings #1: DIY PR

Sherman’s law of prior knowledge, or, predicting the past

The busiest people at Apple right now…

When “infographics” jump the shark

HTTPS is the least of your problems

Stacking up

Beware the truth-tellers

more...  

About us

ClipperHouse.com is brought to you by Matt Sherman and Fernando Chilvarguer, among others. Contact us here.