4 ms·
This is ridiculous. The first two examples they give you, you are actually producing more code than if you had done it properly to begin with. #header, #foot
by jonursenbach 17y ago
This is ridiculous. The first two examples they give you, you are actually producing more code than if you had done it properly to begin with.
#header, #footer {
/* styling here */
}
Less, in their case, is actually more.
- pkulak 17y agoThat's because they are trying to make simple examples. I've wanted this functionality in CSS many times, and in my real-world CSS, it would have made it a _lot_ easier and shorter.
- randallsquared 17y agoI'm not sure if you're serious. First, there are going to be differences between header and footer styles, which means you're going to have to declare them once as you say, and then at least one of them after that for the differences. Second, this offers the opportunity to do things only once, which is helpful for maintenance (though Firebug helps a lot, in my experience, in telling you exactly how you got this style).
- icey 17y agoI think you've missed the point. They are trying to show you that you can define variables for use throughout your CSS, so you aren't forced to search and replace every time you want to change something. Their examples have higher line counts than the pure CSS because their examples have more functionality than pure CSS.