W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] Media queries, viewport dimensions, srcset and picture

From: Matthew Wilcox <mail@matthewwilcox.com>
Date: Thu, 24 May 2012 10:46:57 +0100
Message-ID: <CAMCRKiJcP0fcxNF_ELFjMHQ+bB_217XguV=eoGLzVB=m+Gb7LA@mail.gmail.com>
To: Markus Ernst <derernst@gmx.ch>
Cc: whatwg@lists.whatwg.org, Florian Rivoal <florianr@opera.com>
>> That's true, but the problem isn't so much that as it is that there
>> will be different breakpoints. It's unlikely we'd be working with the
>> same breakpoints, so the one's in the mark-up are all wrong. Leading
>> to incorrect image selection. It's not trivial to revisit all mark-up
>> to correct this.
> Once CSS variables are available, would it be possible to reference them
> from the @media attribute? Given a variable "breakpoint1" is defined in the
> CSS file:
> <source media="(min-width:var(breakpoint1))" srcset="tall.jpg 1x, tall2.jpg
> 2x">

I don't want to take this thread too far off topic, but the "we'll
have changing breakpoints at some point" problem is a major reason why
was thought of. It has it's own drawbacks, but it does address the
problem of breakpoint management and centralisation of breakpoints
throughout the technology stack of HTML/CSS/JS.
Received on Thursday, 24 May 2012 09:47:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC