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

[media-queries] Using calc()

From: Thaddee Tyl <thaddee.tyl@gmail.com>
Date: Fri, 17 Aug 2012 14:26:47 -0700
Message-ID: <CAE3TfZN3291VGyxqaApfezD-YuFctCJKM5FunXZHjP8ksg0k+w@mail.gmail.com>
To: www-style <www-style@w3.org>
Is there any reason not to allow the use of calc() in a media query?
It feels like having the ability to be precise about lengths would be a win.

For instance, if I have an element with a margin of 2cm and a width of
100px, I may want to specify:

@media (max-width: calc(4cm + 100px)) { … }

Right now, it is disallowed and implemented nowhere.
Received on Friday, 17 August 2012 21:27:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:20 UTC