Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Backgrounds #7

Open
chriscoyier opened this issue Aug 23, 2011 · 5 comments
Open

Multiple Backgrounds #7

chriscoyier opened this issue Aug 23, 2011 · 5 comments

Comments

@chriscoyier
Copy link

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;

@SlexAxton
Copy link
Collaborator

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

@chriscoyier
Copy link
Author

no backgrounds

@davatron5000
Copy link
Owner

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

@chriscoyier
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants