Re: Controlling content based on resolution

Hi!

Per the spec there is no limitation to the usage of CSS Media Queries with
SVG

But it could be very cool if the media attribut available on some HTML
element (link, source) could be usable on all SVG elements or at least on
containers such as <g> or <svg> (In a web developer point of view this will
be way more efficient and easier to use than <switch>).


2014-08-19 15:43 GMT+02:00 Paul LeBeau <paul.lebeau@gmail.com>:

> Hi all
>
> There is an interesting article here on the problems with using vector
> graphics for lower resolution icons.
>
> http://www.pushing-pixels.org/2011/11/04/about-those-vector-icons.html
>
> Obviously one way you could remedy this would be with new <switch>
> attributes (eg. requiredWidth="32px" etc).  Another way would be with CSS
> @media queries:
>
>
> @media (max-width: 32px) {
>   G.widget {
>     display: none;
>   }}
>
> Has it been discussed here previously whether, and to what extent, @media
> queries can be used in SVG stylesheets?
>
> Paul
>
>


-- 
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>

Received on Tuesday, 19 August 2014 14:26:28 UTC