- From: Cameron McCormack <cam@mcc.id.au>
- Date: Sun, 5 Apr 2015 09:41:59 +1000
- To: Glen Huang <curvedmark@gmail.com>
- Cc: www-style list <www-style@w3.org>
Glen Huang:
> When you design the media query break points according to certain
> element dimensions, being able to use variables in media queries can
> be very helpful.
I agree it would be helpful, but a problem with this is that you can
easily set up rules inside the @media that change what the @media
condition evaluates to:
:root {
--page-width: 768px;
}
@media (min-width: var(--page-width)) {
:root {
--page-width: 120px;
}
}
So far CSS has avoided adding any new situations like this (the existing
problem with :hover rules moving the element is one we are stuck with).
--
Cameron McCormack ≝ http://mcc.id.au/
Received on Saturday, 4 April 2015 23:42:28 UTC