Re: at-rules irregularities was (Re: CSS Mixins proposal)

On Wed, Mar 23, 2011 at 11:11 AM, Alan Gresley <alan@css-class.com> wrote:
> If this is true, why do browsers disagree here?
>
> <http://css-class.com/test/temp/at-rules1.htm>
>
> Opera 11, Firefox 3.6, IE8, IE9 will only drop the fourth and fifth test.
> This is the CSS.
>
> #four {
>  {background: yellow;}
>  background: navy;
>  @mixin foo;
> }
> #five {
>  @mixin foo;
>  {background: yellow;}
>  background: lime;
> }
>
> Chrome and Safari 5 drops all but the first.
>
> IE7 shows yellow on all test.
>
> The reason that we see differences is due to the different nature of IDENT
> and ATKEYWORD and how they are parsed.

I don't understand the relevance of these tests to what Shane said.
Shane tested the use of @-rules inside of declaration blocks.  You're
testing nested curly braces, which is something completely different,
and which we shouldn't expect to act the same.  (In particular, the
behavior of @-rules inside of declaration blocks is dependent on there
being a semicolon at the end, which the error-recovery behavior uses
to resume parsing as normal.)


> Questions:
>
> 1. Does the nesting of declaration blocks only happen in a .scss file?
> 2. Does SASS require JavaScript to be enabled?

I don't understand.  SASS is a server-side technology.  What relevance
does SASS have here?

~TJ

Received on Thursday, 24 March 2011 04:07:18 UTC