W3C home > Mailing lists > Public > www-style@w3.org > March 2012

RE: CSS Hierarchies + @media queries

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Thu, 1 Mar 2012 01:01:30 +0000
To: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290344B623@TK5EX14MBXC295.redmond.corp.microsoft.com>

[L. David Baron:]
> 
> On Wednesday 2012-02-29 15:42 -0800, Chris Eppstein wrote:
> > I was reading through http://dev.w3.org/csswg/css3-hierarchies/ and
> > noticed that there was no provision for nesting an @media directive
> > inside a hierarchical selector context.
> >
> > In Sass we let @media be nested in any selector and then "bubble" that
> > @media query to the top level.
> >
> > For example:
> >
> > .context {
> >   & .module {
> >     float: left;
> >     width: 50%;
> >     @media all and (max-device-width: 500px) {
> >       float: none;
> >       width: auto;
> >     }
> >   }
> >   & p {
> >     color: #333;
> >   }
> > }
> 
> Just because we could have another way to write something doesn't mean we
> should.  We risk turning the language into perl, i.e., into a language
> where there are ten ways to express the same thing and thus nobody can
> read what anybody else writes.
> 
> I think it's a lot of extra work to implement and it doesn't look like it
> adds much value.
> 
I agree with both these points.
Received on Thursday, 1 March 2012 01:02:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:51 GMT