Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

5 participants

@lkrids

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

@scottdavis
Owner

The tests need to be updated also

@ericam ericam was assigned
@Anahkiasen

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

@chriseppstein
@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.

@ericam ericam was unassigned by lkrids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  frameworks/compass/stylesheets/compass/css3/_background-size.scss
@@ -22,5 +22,5 @@ $default-background-size: 100% auto !default;
) {
$size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
$sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
- @include experimental(background-size, $sizes, -moz, -webkit, -o, not -ms, not -khtml);
+ @include experimental(background-size, $sizes, -moz, not -webkit, not -o, not -ms, not -khtml);
}
Something went wrong with that request. Please try again.