- From: Matthew Wilcox <mail@matthewwilcox.com>
- Date: Thu, 24 May 2012 10:46:57 +0100
- 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 http://www.w3.org/community/respimg/2012/05/13/an-alternative-proposition-to-and-srcset-with-wider-scope/ 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