Skip to content

Broken with local custom properties (aka css vars) #27

Closed
@otbe

Description

@otbe

Hi,

I recently upgraded to postcss 7.0.0 and postcss-preset-env 6.0.10 with postcss-color-mod-function 3.0.3 inside.

Somehow my color-mod functions are broken. For example:

:root {
  --colorsPrimaryLight: color-mod(var(--colorsPrimaryBase) tint(15%));
  --colorsPrimaryBase: #566581;
  --colorsPrimaryDark: color-mod(var(--colorsPrimaryBase) shade(15%));
}

worked with 2.4.3 of postcss-color-mod-function and is now broken (will not be transpiled):
screenshot 2018-10-03 at 00 16 02

I use postcss in my webpack config like:

 {
      loader: 'postcss-loader',
      options: {
        plugins: [
          postcssPresetEnv({
            stage: 0,
            browsers: [">2%"]
          })
        ]
      }
    }

Any idea whats wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions