LayerStyles icon indicating copy to clipboard operation
LayerStyles copied to clipboard

Support new (as well as old) WebKit gradient format

Open dave1010 opened this issue 14 years ago • 5 comments

WebKit has now adopted Mozilla's gradient format: http://www.webkit.org/blog/1424/css3-gradients/

I think Chrome uses the new ones but Safari 5 uses the old ones.

dave1010 avatar May 11 '11 12:05 dave1010

hey! thanks for the feedback :-) i know about the adoption - it's great isn't it? i was about to drop the old format, but sadly safari doesn't support it yet (chrome does). and because the new webkit format is basically the same as the mozilla format i didn't add it. you only have to copy that line and change the prefix. also - to support every new browser you have to copy that line 4 times for all prefixes: -webkit-, -o-, -ms- and no prefix for future support

mrflix avatar May 11 '11 14:05 mrflix

i think you should include the updated -webkit and -o versions in the code presented to people in the app. lots of people will just copy and paste that code.

but i dont think it is worth adding -ms or the unprefixed versions yet because the angle definition of CSS gradients might be changing, last I heard. so no guarantee that the -ms or unprefixed code would work as intended by the time browsers (like IE10 or future Gecko/WebKit) are released that use those declarations.

necolas avatar May 11 '11 19:05 necolas

interesting news on the (predicted) future of gradient declarations - thanks for sharing it!

I'm not sure about adding the prefixes... people should know what they're doing.

mrflix avatar May 11 '11 20:05 mrflix

I think a tool like this is particular useful for developers with less experience. Not everyone is going to be aware of Opera support, updated WebKit syntax, or negative values for spread distance. They'd be worthy additions :)

necolas avatar May 11 '11 21:05 necolas

“people should know what their doing” — ummm, you’re making a GUI app to make these things easy to do, and expecting it not to be used by people who don’t know what they’re doing? <_<

Adding appropriate prefixes will help people to learn, and actually make the CSS work in all supporting browsers. seems like a win-win to me…

oli avatar May 12 '11 04:05 oli