How to use the postcss.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 stylelint / stylelint / src / rules / shorthand-property-no-redundant-values / index.js View on Github external
root.walkDecls(decl => {
      if (
        !isStandardSyntaxDeclaration(decl)
        || !isStandardSyntaxProperty(decl.prop)
      ) { return }

      const { prop, value } = decl
      const normalizedProp = vendor.unprefixed(prop.toLowerCase())

      // Ignore not shorthandable properties, and math operations
      if (
        isIgnoredCharacters(value)
        || !shorthandableProperties.has(normalizedProp)
        || ignoredShorthandProperties.has(normalizedProp)
      ) { return }

      const valuesToShorthand = []

      valueParser(value).walk((valueNode) => {
        if (valueNode.type !== "word") { return }

        valuesToShorthand.push(valueParser.stringify(valueNode))
      })
github makuga01 / dnsFookup / FE / node_modules / autoprefixer / lib / prefixes.js View on Github external
_proto.unprefixed = function unprefixed(prop) {
    var value = this.normalize(vendor.unprefixed(prop));

    if (value === 'flex-direction') {
      value = 'flex-flow';
    }

    return value;
  }
  /**
github stylelint / stylelint / src / rules / property-blacklist / index.js View on Github external
root.walkDecls(decl => {
      const { prop } = decl
      if (!isStandardSyntaxProperty(prop)) { return }
      if (isCustomProperty(prop)) { return }
      if (!matchesStringOrRegExp(vendor.unprefixed(prop), blacklist)) { return }

      report({
        message: messages.rejected(prop),
        node: decl,
        result,
        ruleName,
      })
    })
  }
github GoogleContainerTools / kpt / node_modules / autoprefixer / lib / prefixes.js View on Github external
_proto.prefixed = function prefixed(prop, prefix) {
    prop = vendor.unprefixed(prop);
    return this.decl(prop).prefixed(prop, prefix);
  }
  /**
github stylelint / stylelint / src / rules / function-whitelist / index.js View on Github external
valueParser(value).walk(function (node) {
        if (node.type !== "function") { return }
        if (!isStandardSyntaxFunction(node)) { return }
        if (matchesStringOrRegExp(vendor.unprefixed(node.value).toLowerCase(), whitelist)) { return }
        report({
          message: messages.rejected(node.value),
          node: decl,
          index: declarationValueIndex(decl) + node.sourceIndex,
          result,
          ruleName,
        })
      })
    })
github webhintio / hint / packages / utils-compat-data / src / css.ts View on Github external
const getPartialValueUnsupported = (context: Identifier, value: string, browsers: string[]): UnsupportedBrowsers | null => {
    const prefix = vendor.prefix(value);
    const unprefixedValue = vendor.unprefixed(value);
    const tokens = getTokens(valueParser(value).nodes);

    for (const entry of Object.values(context)) {

        const matches = entry.__compat && entry.__compat.matches;

        if (!matches) {
            continue;
        }

        if (matches.regex_value && new RegExp(matches.regex_value).exec(unprefixedValue)) {
            return getUnsupportedBrowsers(entry, prefix, browsers, unprefixedValue);
        }

        if (matches.keywords) {
            for (const [tokenPrefix, tokenValue] of tokens) {
github johandb / svg-drawing-tool / node_modules / autoprefixer / lib / prefixes.js View on Github external
_proto.unprefixed = function unprefixed(prop) {
    var value = this.normalize(vendor.unprefixed(prop));

    if (value === 'flex-direction') {
      value = 'flex-flow';
    }

    return value;
  }
  /**
github postcss / autoprefixer / lib / prefixes.js View on Github external
unprefixed (prop) {
    let value = this.normalize(vendor.unprefixed(prop))
    if (value === 'flex-direction') {
      value = 'flex-flow'
    }
    return value
  }
github sindresorhus / sublime-autoprefixer / node_modules / autoprefixer / lib / prefixes.js View on Github external
_proto.unprefixed = function unprefixed(prop) {
    var value = this.normalize(vendor.unprefixed(prop));

    if (value === 'flex-direction') {
      value = 'flex-flow';
    }

    return value;
  }
  /**
github aermin / ghChat / 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);
    };