Skip to content

Unable to parse color from string "$primary-color" #41

@martenzander

Description

@martenzander

I am using postcss-advanced-variables and if i try to put variables into my color values I get the following error:

Unable to parse color from string "$primary-color"

this is my postcss line up:

    'postcss-import': {},
	'postcss-at-rules-variables' : {},
	'postcss-nested-ancestors' : {},
	level4 : {},
	'postcss-for' : {},
	'postcss-each' : {},
	'postcss-sassy-mixins' : {},
	'postcss-advanced-variables' : {},
	'postcss-conditionals' : {},
	'postcss-hexrgba' : {},
	'postcss-object-fit-images' : {},
	'postcss-flexbugs-fixes' : {},
	'postcss-quantity-queries' : {},
	'postcss-size' : {},
	'postcss-will-change' : {},
	'postcss-nested' : {},
	'postcss-easings' : {},
	'postcss-random' : {},
	'postcss-calc' : {
		warnWhenCannotResolve: false,
		mediaQueries: true,
	},
	'postcss-inline-svg' : {
		path: 'src/svg',
		encode: function encode(code) {
		    return code
		        .replace(/%/g, '%25')
		        .replace(/</g, '%3C')
		        .replace(/>/g, '%3E')
		        .replace(/&/g, '%26')
		        .replace(/#/g, '%23');
		},
		removeFill: true,
	},
	'postcss-initial' : {},
	autoprefixer : { browsers },
	'postcss-color-function' : {},
	cssnano : ctx.env === 'production' ? {
		filterPlugins: false,
		safe: true,
		mergeRules: false,
		browsers,
		discardComments: {
			removeAll: true,
		},
	} : false,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions