Re: [mediaqueries] User-defined Media Queries?

But values defined by the user with JS are *inside* the document itself.



On 10 June 2013 16:04, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Mon, Jun 10, 2013 at 4:29 AM, Stu Cox <stuart.cox@gmail.com> wrote:
> > I love this idea, but is there actually much scope for new *media*
> queries
> > to be defined, given the limited information available to the DOM?
> >
> > I'd argue not, and that the Modernizr / theming use cases may be more
> > common.
> >
> > I think there's already a problem with confusion between browser features
> > and media/device features (e.g. my old favourite: browser supporting the
> > Touch Events API vs device having a touchscreen). Values set by users in
> JS
> > are unlikely to accurately represent a feature of the media.
>
> I disagree that there's an important difference.  The point of MQ is
> to test for things that are outside the document itself; that's what's
> meant by "the medium", as it's the context in which the document
> itself is embedded.  I don't think it's important to draw this
> distinction for authors.
>
> More importantly, I don't think it's worthwhile to create a third type
> of conditional rule which has identical syntax to @media, solely to
> represent a dubious semantic distinction. I'd support this if there
> was no good way to make safe syntax for the author-defined stuff, but
> there is, so I'd greatly prefer sticking with @media as it is.
>
> ~TJ
>

Received on Monday, 10 June 2013 15:23:15 UTC