Re: [css-d] SVG as background image - and fallback image

2010-12-28 Thread G.Sørtun



Anyone with a cleaner suggestion ?  Bonus cookie for the most minimal code 
possible.


Cleaner, no, but the usual nonsense will probably work...

http://www.gunlaug.no/contents/styles/target-browser.css

(I don't care much for cookies anyway :-) )

Happy New Year  (check our latest...)

Georg
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] SVG as background image - and fallback image

2010-12-28 Thread Philippe Wittenbergh

On Dec 29, 2010, at 10:34 AM, G.Sørtun wrote:

 
 Anyone with a cleaner suggestion ?  Bonus cookie for the most minimal code 
 possible.
 
 Cleaner, no, but the usual nonsense will probably work...
 
 http://www.gunlaug.no/contents/styles/target-browser.css

Thanks Georg. I had forgotten about that @media syntax / query that Opera 
appears to parse by the magic of Nordic Elfes.

updated test case: http://dev.l-c-n.com/_temp/res-5b-svg.html

This should work as expected everywhere, I think (works OK in Gecko 
1.9.0-1.9.2, Gecko 2, WebKit, Mobile WebKit, Opera 10.6+, Opera Mini)

Can someone check with IE 9 ? Thanks. I think my background-shorthand is 
correct. And I think it should be able to handle my .svg images


BTW - Opera 11 does weird things with that CSS3 background shorthand. It 
doesn't understand it as a whole, but apparently it parses enough of it to 
reset my background-origin declaration… That feels pretty wrong.

(Now I have to convince Adobe Illustrator in being better at handling 
pixelsnapping. I have CS4, I'm told CS5 is better at that… Maybe the Goddess of 
Small CSS Things will provide me a copy one of those days, but first she has to 
bring me a Windows 7 VM)

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] SVG as background image - and fallback image

2010-12-28 Thread Alan Gresley

On 29/12/2010 2:26 PM, Philippe Wittenbergh wrote:


On Dec 29, 2010, at 10:34 AM, G.Sørtun wrote:




Anyone with a cleaner suggestion ?  Bonus cookie for the most
minimal code possible.


Cleaner, no, but the usual nonsense will probably work...



Using media queries to hack is getting beyond the impossible.



http://www.gunlaug.no/contents/styles/target-browser.css


Thanks Georg. I had forgotten about that @media syntax / query that
Opera appears to parse by the magic of Nordic Elfes.

updated test case: http://dev.l-c-n.com/_temp/res-5b-svg.html

This should work as expected everywhere, I think (works OK in Gecko
1.9.0-1.9.2, Gecko 2, WebKit, Mobile WebKit, Opera 10.6+, Opera
Mini)

Can someone check with IE 9 ? Thanks. I think my background-shorthand
is correct. And I think it should be able to handle my .svg images



Working correctly in IE9. Just thinking though, what happens when Gecko 
supports the slash / syntax? You could perhaps add another dangerous 
hack. Both lines have a red background in IE9 and IE8 which is correct.


http://css-class.com/test/css-testsuite/css2.1/declaration-string-character-exscapes-000.htm

While testing to see what was bugging out Gecko, I noted that Safari 5 
would allow the svg to be inserted in via content {..}




BTW - Opera 11 does weird things with that CSS3 background shorthand.
It doesn't understand it as a whole, but apparently it parses enough
of it to reset my background-origin declaration… That feels pretty
wrong.



What part does Opera 11 attempt to parse?


--
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] SVG as background image - and fallback image

2010-12-28 Thread Philippe Wittenbergh

On Dec 29, 2010, at 3:44 PM, Alan Gresley wrote:

 Working correctly in IE9. Just thinking though, what happens when Gecko 
 supports the slash / syntax?

When Gecko, or WebKit for the matter, start supported the full CSS 3 background 
shorthand, it will use it and my ugly little hack won't be needed. I probably 
should reorder the whole stylesheet in that test file a little to make it more 
future proof. Leveraging the cascade etc.


  You could perhaps add another dangerous hack. Both lines have a red 
 background in IE9 and IE8 which is correct.
 
 http://css-class.com/test/css-testsuite/css2.1/declaration-string-character-exscapes-000.htm
 
 While testing to see what was bugging out Gecko, I noted that Safari 5 would 
 allow the svg to be inserted in via content {..}

Yes WebKit supports SVG anywhere where you can use 'image': foreground image, 
background image, border-image, list-style image, etc, etc. I think Gecko does 
the same now, although I haven't tested yet. And I suspect Opera also supports 
SVG anywhere.

 BTW - Opera 11 does weird things with that CSS3 background shorthand.
 It doesn't understand it as a whole, but apparently it parses enough
 of it to reset my background-origin declaration… That feels pretty
 wrong.
 
 
 What part does Opera 11 attempt to parse?
I don't exactly understand what Opera 11 is trying to do. I noticed that it 
didn't use the background-origin: content-box; anymore after inserting the 
background shorthand in the stylesheet. I didn't expect that parse error. I 
would expect it to ignore the whole declaration completely.
( given that I don't mention the background-origin in that shorthand, it is 
reset to the initial value, which is the expected behaviour)

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/