Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added @experimental support for vendor-prefixed property and value. #1016

Closed
wants to merge 1 commit into from

3 participants

@dannygarcia

There are some cases where prefixing both the property and value is useful.

One example is for creating a mask-image mixin that also prefixes the gradient:

@mixin mask-image($gradient) {
   @include experimental-both(mask-image, $gradient); }
@dannygarcia

Another use case for this recently became apparent for implementing future-proof transitions for CSS custom filters:

-webkit-transition: -webkit-filter ease-in-out 1s;

Could be written as:

@include experimental-both(transition, filter ease-in-out 1s);
@scottdavis
Owner

Needs a test case

@chriseppstein

The experimental mixin is basically unused now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2012
  1. @dannygarcia
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 0 deletions.
  1. +17 −0 frameworks/compass/stylesheets/compass/css3/_shared.scss
View
17 frameworks/compass/stylesheets/compass/css3/_shared.scss
@@ -36,3 +36,20 @@
@if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
@if $official { #{$property} : #{$value}; }
}
+
+// Same as experimental(), but for cases when the property and the value are vendorized
+@mixin experimental-both($property, $value,
+ $moz : $experimental-support-for-mozilla,
+ $webkit : $experimental-support-for-webkit,
+ $o : $experimental-support-for-opera,
+ $ms : $experimental-support-for-microsoft,
+ $khtml : $experimental-support-for-khtml,
+ $official : true
+) {
+ @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : -webkit-#{$value}; }
+ @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : -khtml-#{$value}; }
+ @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : -moz-#{$value}; }
+ @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : -ms-#{$value}; }
+ @if $o and $experimental-support-for-opera { -o-#{$property} : -o-#{$value}; }
+ @if $official { #{$property} : #{$value}; }
+}
Something went wrong with that request. Please try again.