assigning the same attributes to multiple selector

21 views
Skip to first unread message

sbtodd

unread,
Nov 17, 2007, 4:23:05 PM11/17/07
to Haml
I tried this in a .sass file:

h1,
h2,
h3
:font
:weight bold
:family Helvetica, Arial, sans-serif; color: #000

The result in the .css file was:

h3 {
font-weight: bold;
font-family: Helvetica, Arial, sans-serif; color: #000; }

h1 and h2 were not included ...

Do I need to repleat the attributes like this:

h1
:font
:weight bold
:family Helvetica, Arial, sans-serif; color: #000
h2
:font
:weight bold
:family Helvetica, Arial, sans-serif; color: #000
h3
:font
:weight bold
:family Helvetica, Arial, sans-serif; color: #000

I looked in: http://haml.hamptoncatlin.com/docs/sass but did
not see a way to assign the same attributes to multiple selectors.

Todd

Nathan Weizenbaum

unread,
Nov 17, 2007, 7:32:48 PM11/17/07
to ha...@googlegroups.com
You have to put them all on the same line:

h1, h2, h3
:font
:weight bold
:family Helvetica, Arial, sans-serif
:color #000

In trunk, I believe putting them on a separate line will work, but not
in stable (1.7.1).

- Nathan

sbtodd

unread,
Nov 17, 2007, 8:42:39 PM11/17/07
to Haml
thanks .. that makes sense .. will try it
> > I looked in:http://haml.hamptoncatlin.com/docs/sassbut did
Reply all
Reply to author
Forward
0 new messages