Hm, you are right. I tried to replicate some style I saw in css. But it
doesn't matter. Thanks for the thoughts.

On Sun, Sep 20, 2009 at 7:54 PM, Chris Eppstein <[email protected]> wrote:

> Please don't take offense, but sass will not help you do what you are
> trying to do because it is a bad idea. Sass is here to help you make more
> maintainable stylesheets. One of the ways we do this is by enforcing best
> practices.
>
> The real structure of your page is encoded by your *document*. To nest
> selectors means you are creating a descendant selector. To imply a structure
> in your stylesheet where none is actually emitted is to duplicate
> information that will eventually become out of sync and then confusing and
> error prone.
>
> Chris
>
>
> On Sun, Sep 20, 2009 at 10:43 AM, Mark de Bruijn <[email protected]>wrote:
>
>> I know. But then I lose the indention pointing out the real structure.
>> I was looking for something like
>> #foo
>>   color: red
>> --#bar
>>     color: blue
>> where everything below #bar get's treates as it has two spaces less.
>>
>>
>> On Sun, Sep 20, 2009 at 7:18 PM, Chris Eppstein <[email protected]>wrote:
>>
>>> #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
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Mark
>>
>>
>>
>
> >
>


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