deCSS3
deCSS3 copied to clipboard
Multiple Backgrounds
Hey ya'll -- I tried to do this a while back as well but mine is way ghetto: https://github.com/chriscoyier/CSS3-StripTease
I'm thinking multiple backgrounds should be pretty easy to test for, just look for a comma in the value for background-image and there is one set background-image: none;
Do multiple backgrounds show up as a single background or no backgrounds?
no backgrounds
I can add a multiple background to the test suite. I'm just about to make a push here. It typically matches a:
background(-image): url(pathtoimage1.jpg), url(pathtoimage2.jpg);
Pattern. Should be easy to detect? But you can also slide gradients in there. so maybe we just detect the ,.
I would think gradients are a bit harder just because some dorkus might do like:
background-image: url(/images/-webkit-/linear/puppy.jpg);
So matching on keywords like "-webkit" would match that and remove it unjustly. But maybe that dorkus deserves that.
Another background issue...
If you have:
header {
background: #333;
background: rgba(0,0,0,0.8);
}
deCSS3 will end up removing both, leaving a transparent background.