#foo
  color: red
#bar
  color: blue

On Sun, Sep 20, 2009 at 9:59 AM, Mark de Bruijn <[email protected]> wrote:

> So how to format the following to generate single ID's?
>
> #foo
>   color: red
>   #bar
>     color: blue
>
>
> On Sun, Sep 20, 2009 at 6:03 PM, Chris Eppstein <[email protected]>wrote:
>
>> Indentation past the comment's indent level is ignored within a comment.
>>
>> On Sun, Sep 20, 2009 at 1:41 AM, Mark de Bruijn <[email protected]>wrote:
>>
>>>
>>> But doesn't sass go mad on the incorrect indention?
>>>
>>> On 9/19/09, Chris Eppstein <[email protected]> wrote:
>>> > It's your stylesheet. Please write it the way you want it. There's no
>>> value
>>> > in deploying something to production that you didn't develop against.
>>> in
>>> > fact it's worse than no value. If you want to see the page structure
>>> but not
>>> > use it, that is what comments are for.
>>> >
>>> > chris
>>> >
>>> >
>>> > On Sat, Sep 19, 2009 at 8:43 AM, Mark de Bruijn <[email protected]>
>>> wrote:
>>> > >
>>> > > I have seen that problem. That's why I suggest it as a compiler
>>> option.
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > On Sat, Sep 19, 2009 at 5:35 PM, G. Sobrinho <
>>> [email protected]>
>>> > wrote:
>>> > >
>>> > > > 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
>>> > > >
>>> > > >
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Mark
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> >
>>> >
>>> >  >
>>> >
>>>
>>>
>>> --
>>> Mark
>>> But
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Mark
>
>
> >
>

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