Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Is it possible to assign env variable to scss variable? #7

Closed
@asolopovas

Description

@asolopovas

Hi,

I am using wordpress and often I need to use $theme-path across my project to specify the location of assets. I was able to pass the necessary var using your tool into the css file but it only works if I apply this way background: url(env(--theme-path) + '/images/img.jpg') if I try to do something like that

$theme-path: env(--theme-path)
.el {
    background: url($theme-path + "/static/img/background.png");
}

it throws an error. Is there a way around it?

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