Skip to content

Simplify usage with var(--color) #72

@henryruhs

Description

@henryruhs

Hey, I use this awesome plugin after processing variables with postcss-custom-properties ... to make it work together something like this is needed:

@svg-load icon-search url('@mdi/svg/svg/magnify.svg')
{
	fill: var(--color);
}

&:after
{
	background: svg-inline(rs-icon-search) center no-repeat;
}

What I totally would love is a syntax like:

&:after
{
	background: svg-load('@mdi/svg/svg/magnify.svg', fill = var(--color)) center no-repeat;
}

@TrySound Is there a way to rewrite this plugin or my postcss chain to make the easy syntax possible?

require('postcss-custom-properties')(
{
	preserve: false
}),
require('postcss-inline-svg')(
{
	paths:
	[
		'node_modules'
	]
}),

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions