On Mar 19, 2012 8:44 PM, "Daniel Friesen" <[email protected]> wrote:
>>
> CSS image fallbacks may be a little annoying.
> Last time I checked browsers don't consider "I don't understand that
image filetype." an invalid url(). In other words in:
> background-image: url(foo.png);
> background-image: url(foo.svg);
> Every browser jumps to url(foo.svg) and the ones that don't understand
.svg's choke.

D'oh! I don't suppose @media queries can help with this... no doesn't look
like it.

Ooh! We may be able to handle this like the js/nojs styles.

Have a bit of JS on startup check for svg support and add a class to the
HTML root element. Then we just need .svg .foo {} entries with the svg
background overrides.

Not ideal but should work, with the downside that non-JS browsers don't get
svg.

-- brion
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to