concept css in category express

This is an excerpt from Manning's book Express in Action: Writing, building, and testing Node.js applications.
Express is often used to power single-page applications (SPAs). SPAs are very JavaScript-heavy on the front end, and they usually require a server component. The server is usually required to simply serve the HTML, CSS, and JavaScript, but there’s often a REST API, too. Express can do both of these things quite well; it’s great at serving HTML and other files, and it’s great at building APIs. Because the learning curve is relatively low for front-end developers, they can whip up a simple SPA server with little new learning required.
CSS doesn’t have variables. If your website’s link color is #29A1A4, for example, and you decide you want to change it to #454545, you’d have to search for it everywhere in your CSS file and change it. If you want to experiment with a color that’s used in many different places, you’ll be doing find-replace, which can lead to reliability issues. It’s also unclear to other developers which color is which; where is that color used in various places?
LESS added variables to CSS, allowing you to solve this kind of problem. Let’s say you want to define your site’s primary color as #FF9900. In LESS, you might do something like what’s shown in the following listing.
If you run the LESS code in listing 11.1 through a LESS compiler (like the one at http://less2css.org/), the CSS shown in the next listing will be produced.
Start by writing a simple LESS file, shown in the next listing, which you’ll compile to CSS with Grunt.
Listing 11.16. A simple LESS file (in my_css/main.less)
article { display: block; h1 { font-size: 16pt; color: #900; } p { line-height: 1.5em; } }That should translate to the CSS shown in the next listing.
In that way, LESS and CSS are a lot like Express and Node. In short, CSS is a powerful layout tool but its syntax can be cumbersome and limited. That’s why LESS was made—it doesn’t fundamentally change CSS; it smooths it out a bit.
CSS is a powerful tool for laying out web pages, but it’s missing a number of features that people wanted. For example, developers want to reduce repetition in their code with constant variables instead of hard-coded values; variables are present in LESS but not CSS. LESS extends CSS and adds a number of powerful features.
Unlike Express, LESS is actually its own language. That means that it has to be compiled down into CSS in order to be used by web browsers—browsers don’t speak LESS, they speak CSS.