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

Already on GitHub? Sign in to your account

background-size doesn't need prefixes for opera or webkit #1169

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants

lkrids commented Feb 13, 2013

background-size doesn't need prefixes for opera or webkit: http://www.standardista.com/css3/css3-background-properties

Owner

scottdavis commented Feb 14, 2013

The tests need to be updated also

@ghost ghost assigned mirisuzanne Feb 19, 2013

I don't think Firefox needs the prefix either, as shown on the link above, no ?

Owner

chriseppstein commented Dec 4, 2013

@import "compass/css3";

$debug-browser-support: true;
.bs {
  @include background-size;
}

is compiled to:

/* line 4, ../sass/screen.scss */
.bs {
  /* Capability background-img-opts is prefixed with -moz because 0.27123% of users need it which is more than the threshold of 0.01%. */
  /* Creating new -moz context. */
  -moz-background-size: 100% auto;
  /* Capability background-img-opts is not prefixed with -ms because 0% of users are affected which is less than the threshold of 0.01. */
  /* Capability background-img-opts is prefixed with -o because 0.02466% of users need it which is more than the threshold of 0.01%. */
  /* Creating new -o context. */
  -o-background-size: 100% auto;
  /* Capability background-img-opts is prefixed with -webkit because 1.94978% of users need it which is more than the threshold of 0.01%. */
  /* Creating new -webkit context. */
  -webkit-background-size: 100% auto;
  background-size: 100% auto;
}

You can set your $background-size-threshold to 2 if you really want to omit it for the 2% of webkit users that still need it. If you set it to 0.05 it would prune out just the opera prefix. If you set it to 0.3 it would prune out opera and firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment