deCSS3 icon indicating copy to clipboard operation
deCSS3 copied to clipboard

Multiple Backgrounds

Open chriscoyier opened this issue 14 years ago • 5 comments

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;

chriscoyier avatar Aug 23 '11 15:08 chriscoyier

Do multiple backgrounds show up as a single background or no backgrounds?

SlexAxton avatar Aug 23 '11 15:08 SlexAxton

no backgrounds

chriscoyier avatar Aug 23 '11 15:08 chriscoyier

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 ,.

davatron5000 avatar Aug 23 '11 15:08 davatron5000

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.

chriscoyier avatar Aug 23 '11 15:08 chriscoyier

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.

chriscoyier avatar Feb 12 '12 17:02 chriscoyier