This is not a question, but just a rant. Or maybe a question… or maybe I just don’t know much about box shadows..
In order to use box shadows in CSS3 in different browsers, here what I have to do:
-webkit-box-shadow: 0px 0px 10px #676767;
-moz-box-shadow: 0px 0px 10px #676767;
box-shadow: 0px 0px 10px #676767;
Is there anyone else finding this incredibly stupid in order for Firefox, Opera and Safari/Chrome/Webkit to work? And it will not even work in IE at all!
Is there anything I can do to reduce the duplicated CSS values?
Thanks,
badallen
Because
box-shadowis not yet officially specified, you need the vendor-specific prefixes (eg:-moz,-webkit,-ms). IE doesn’t support them period; I’d recommend using CSS3 PIE if you want to use IE. PIE also adds support for other CSS 3 eye-candy likeborder-radiusand gradients.If you want to avoid having to write the same code every time, I’d recommend using LESS or SASS and their mixins:
http://lesscss.org/
http://sass-lang.com/