Home › Forums › CSS › how many CSS files? › Re: how many CSS files?
October 3, 2008 at 2:00 pm
#50286
brandon
Member
Personally, I love using SASS (http://haml.hamptoncatlin.com/docs/rdoc … /Sass.html) While it’s a little tougher to use outside of the Rails framework, it makes a cinch of writing CSS. Furthermore HAML is a true gem (no pun intended) when it comes to writing markup. You can be the judge. What looks prettier, this
Code:
My Site
Lorem ipsum yadda yadda
or this?
Code:
%html
%head
%title My Site
%body
#page
%h1 My Site
%p Lorem ipsum yadda yadda
%head
%title My Site
%body
#page
%h1 My Site
%p Lorem ipsum yadda yadda
More on topic, SASS handles the "encapsulation" you usually have to do manually in a CSS file. So instead of writing
Code:
div#page {
width: 800px
}
div#page p {
padding: 10px
}
div#page p a {
color: red
}
width: 800px
}
div#page p {
padding: 10px
}
div#page p a {
color: red
}
you can write
Code:
div#page
:width 800px
p
:padding 10px
a
:color red
:width 800px
p
:padding 10px
a
:color red