-
Website
http://www.gabrielweinberg.com/blog/ -
Original page
http://www.gabrielweinberg.com/blog/2009/06/a-harsh-css-environment-for-testing-widgets.html -
Subscribe
All Comments -
Community
-
Top Commenters
-
MacSmiley
1 comment · 5 points
-
scribu
2 comments · 2 points
-
aggieben
1 comment · 3 points
-
cera
1 comment · 1 points
-
robdimarco
2 comments · 1 points
-
-
Popular Threads
I'd imagine you'll need to protect against many others for more modern CSS (such as-border-radius, -moz-border-radius, and -webkit-border-radius). Also, any inline elements (span, em, strong, etc.) will display as block within the armor. Solving proliferating styles and inline/block elements will probably add more bloat than value, though.
As for the modern properties, they should probably be added, at least the ones that often get used. I suppose if you added *all* of them you'd get some serious bloat!
One question: what is the most reliable way you've found for injecting CSS?
Wrt to injecting CSS, you can do it via JS by creating a link element and appending it to the head tag. It has its issues (http://wiki.fluidproject.org/display/fluid/Meth...) but it is the cleanest in terms of copy and paste for the user, i.e. they can just copy and paste a JS line.
At the moment I'm leaning towards putting it all inline, however. It is the safest way to make sure it renders correctly, and you can avoid JS altogether if you don't need it.