But it will generate a problem. Let me show: In my home page:

<div id="one">
  <div id="two"></div>
</div>

And into another page:

<div id="two"></div>

So, I write into my SASS #one #two to select the div into home page and only
#two to select from all pages. Did you see the problem?


If you want to use only last selector, write this into SASS:

#bar
  color: red

instead of

#foo
  #bar
    color:red

2009/9/19 Dykam <[email protected]>

>
> The following sass:
> #foo
>  #bar
>    color: red
> generates:
> #foo #bar {
>  color: red; }
>
> I am ok with that, it reads well. But it is not usefull for
> deployment. There you want small CSS. My css is already compressed and
> minified on the fly, but those selectors keep bugging me. As there is
> only 1 ID, they aren't needed to be that long.
>
> I could just use the following sass:
> #bar
>  color: red
>
> But it loses the visual hierarchical structure in more complex sass.
> So I suggest to add an option to the compile which eliminates all
> selectors before an ID selector. This would change e.g. the following
> cases:
> #foo
>  #bar
>    color: red
> to
>  #bar {
>    color: red; }
> instead of
>  #foo #bar {
>    color: red; }
>
> #foo
>  color: blue
>  #bar
>    color: red
> to
> #foo {
>  color: blue; }
>  #bar {
>    color: red; }
> instead of
>
> #foo {
>  color: blue; }
>  #foo #bar {
>    color: red; }
> >
>


-- 
Cordialmente,

Gabriel Sobrinho
Diretor de desenvolvimento

Hite - Comunicação Digital e Mídia Interativa
http://www.hite.com.br/

+55 31 8775 8378

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to