-
Website
http://wiki.alcidesfonseca.com/ -
Original page
http://wiki.alcidesfonseca.com/blog/less-css -
Subscribe
All Comments -
Community
-
Top Commenters
-
Dextro
16 comments · 1 points
-
alcides
107 comments · 2 points
-
levifig
1 comment · 1 points
-
zone41
3 comments · 1 points
-
Ruben Fonseca
3 comments · 1 points
-
-
Popular Threads
-
Alcides Fonseca: Test your backups
21 hours ago · 2 comments
-
Alcides Fonseca: Obrigado Bentinho
1 week ago · 6 comments
-
Alcides Fonseca: DEInnovation
2 weeks ago · 1 comment
-
Alcides Fonseca: Test your backups
Colors for instance. You don't need variables at all in order to avoid repetition. In my case, all my colors go in the end of the CSS file. For instance, if I use a #FF0000, I do the following:
#element1, .someclass, div.someotherclass sometag, whatever, #something {
color: #ff0000;
}
You can see an example here: http://n.ki.sl.pt
I do the same for font sizes (altough that file doesn't have that yet). As for organization, use comments, learn how to separate things. Place the main layout elements at the top, then have the specific sections CSS, and a section for reusable elements across different sections.
I seriously think people fail to understand how do organize their CSS code a lot, even designers who probably write 10 times the CSS I do.
In you code, you will repeat #element1, .someclass, etc... a lot of times, while I repeat colors and font-sizes.
You're repeating yourself one way or the other. I like CSS to be target-oriented and the only thing I lack is variables. And it's something that wouldn't hurt CSS, would it?
-- MV