Hi there
I'm just getting started with Haml & Sass, so apologies if this has
been asked and answer before (I did search, but couldn't find anything
relevant).
I'm using sass to specify something like this;
<pre>
.footer
p
:font-weight bold
.credits
:font-weight: normal
</pre>
This compiles to the following CSS
<pre>
.footer p {
font-weight: bold; }
.footer p .credits {
font-weight: normal; }
</pre>
This is exactly what I would expect, from the "Nested rules" section
of this page; http://haml.hamptoncatlin.com/docs/sass
My problem is that the space between "p" and ".credits" in the
rendered CSS seems to prevent the rule from applying correctly. At
least, that seems to be the case with Firefox 2.0.0.8 and Safari 2.0.4
(419.3) running on OS X 10.4.10
If I use bin/sass to generate test.css from the snippet above, and
then create an html file like this;
<pre>
<html>
<head>
<link href="test.css" media="screen" rel="stylesheet" type="text/
css" />
</head>
<body>
<p>this is not bold</p>
<div class="footer">
<p>this should be bold (and it is)</p>
</div>
<div class="footer">
<p class="credits">this should not be bold, but it is</p>
</div>
</body>
</html>
</pre>
Then until I edit the css to change
.footer p .credits {
into
.footer p.credits
...the credits formatting does not apply, and the text in the last
paragraph is bold.
I can get the css output I want, by writing the sass like this;
<pre>
.footer
p
:font-weight bold
p.credits
:font-weight normal
</pre>
But, that's a lot less elegant.
Am I misunderstanding something here (which wouldn't surprise me at
all ;). Or, is there some way to tell Sass that it should output child
class selectors of a node without a space between them, when rendering
the CSS.
Many thanks in advance for any help.
David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---