Andrew Poulos <
ap_...@hotmail.com> wrote on 11 Nov 2020 in
comp.infosystems.www.authoring.stylesheets:
> I solved it but I had to write some JavaScript to do it. If one could
> use CSS variables within @media eg
>
> @media screen and (max-width: var(--num) { }
>
> then it may have been easier.
That it can't work, makes sense, as, while you can set --aValue e.g. to
:root, that is, the <html> element, and from there be inherited to other
elements, a media query, not being an element, can't inherit from <html>, so
it can't work.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)