Tech Tutorials Database
GeekArticles Database SQL Server
 

Improving CSS With .LESS

 
Author: 4guysfromrolla.com
Category: SQL Server
Comments (0)

<p><a Style Sheets</a>, or CSS, is a syntax used to describe the look and feel of the elements in a web page. CSS allows a web developer to separate the document content - the HTML, text, and images - from the presentation of that content. Such separation makes the markup in a page easier to read, understand, and update; it can result in reduced bandwidth as the style information can be specified in a separate file and cached by the browser; and makes site-wide changes easier to apply. For a great example of the flexibility and power of CSS, check out <a Zen Garden</a>. This website has a single page with fixed markup, but allows web developers from around the world to submit CSS rules to define alternate presentation information. </p><p> Unfortunately, certain aspects of syntax leave a bit to be desired. Many style sheets include repeated styling information because CSS does not allow the use of variables. Such repetition makes the resulting style sheet lengthier and harder to read; it results in more rules that need to be changed when the website is redesigned to use a new primary color. Specifying inherited CSS rules, such as indicating that <code>a</code> elements (i.e., hyperlinks) in <code>h1</code> elements should not be underlined, requires creating a single selector name, like <code>h1 a</code>. Ideally, CSS would allow for nested rules, enabling you to define the <code>a</code> rules directly within the <code>h1</code> rules. </p><p><a is a free, open-source port of <a library</a>. LESS (and .LESS, by extension) is a parser that allows web developers to create style sheets using new and improved language features, including variables, operations, mixins, and nested rules. Behind the scenes, .LESS converts the enhanced CSS rules into standard CSS rules. This conversion can happen automatically and on-demand through the use of an Handler, or done manually as part of the build process. Moreover, .LESS can be configured to automatically minify the resulting CSS, saving bandwidth and making the end experience a snappier one. </p><p> This article shows how to get started using .LESS in your ASP.NET websites. Read on to learn more! <br /><a More &gt;</a></p>

Read More...




Sponsored Links




Read Next: Displaying Multimedia Content In A Floating Window Using FancyBox



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe