How to use the postcss/lib/vendor.unprefixed function in postcss

To help you get started, we’ve selected a few postcss examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robwierzbowski / node-pixrem / lib / pixrem.js View on Github external
rule.each(function (decl, i) {

      if (decl.type !== 'decl') { return; }

      var value = decl.value;

      if (value.indexOf('rem') !== -1) {

        var prop = vendor.unprefixed(decl.prop);
        // replace rems only if needed
        var isFontShorthand = (prop === 'font');
        var isSpecialCaseIE9_10 = (isIE9_10 && (isPseudoElement || isFontShorthand));
        var isUseless = (!isIE9_10 && !(_VALUES.test(value) || _PROPS.test(prop)));

        if ( isSpecialCaseIE9_10 || isUseless ) {

          value = value.replace(_remgex, function ($1) {
            // Round decimal pixels down to match webkit and opera behavior:
            // http://tylertate.com/blog/2012/01/05/subpixel-rounding.html
            return Math.floor(parseFloat($1) * toPx(_rootvalue)) + 'px';
          });

          if (_options.replace) {
            decl.value = value;
          } else {
github sean-codes / microprojects / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.prefixed = function prefixed(prop, prefix) {
        prop = vendor.unprefixed(prop);
        return this.decl(prop).prefixed(prop, prefix);
    };
github fossasia / susper.com / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.unprefixed = function unprefixed(prop) {
        var value = this.normalize(vendor.unprefixed(prop));
        if (value === 'flex-direction') {
            value = 'flex-flow';
        }
        return value;
    };
github Graphite-Docs / graphite / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.unprefixed = function unprefixed(prop) {
        var value = this.normalize(vendor.unprefixed(prop));
        if (value === 'flex-direction') {
            value = 'flex-flow';
        }
        return value;
    };
github Graphite-Docs / graphite / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.prefixed = function prefixed(prop, prefix) {
        prop = vendor.unprefixed(prop);
        return this.decl(prop).prefixed(prop, prefix);
    };
github sean-codes / microprojects / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.unprefixed = function unprefixed(prop) {
        var value = this.normalize(vendor.unprefixed(prop));
        if (value === 'flex-direction') {
            value = 'flex-flow';
        }
        return value;
    };
github cytle / wechat_web_devtools / package.nw / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.unprefixed = function unprefixed(prop) {
        var value = this.normalize(vendor.unprefixed(prop));
        if (value === 'flex-direction') {
            value = 'flex-flow';
        }
        return value;
    };
github cytle / wechat_web_devtools / package.nw / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.prefixed = function prefixed(prop, prefix) {
        prop = vendor.unprefixed(prop);
        return this.decl(prop).prefixed(prop, prefix);
    };
github fossasia / susper.com / node_modules / autoprefixer / lib / prefixes.js View on Github external
Prefixes.prototype.prefixed = function prefixed(prop, prefix) {
        prop = vendor.unprefixed(prop);
        return this.decl(prop).prefixed(prop, prefix);
    };