Skip to content

Resolve css var's with their actual values? #339

Description

@jmalatia

Is there a way to resolve css variables into their actual values?

css

:root {
    --my-css-color-var: blue;
}

.my-class {
    color: var(--my-css-color-var);
}

html

<html>
    <body>
        <div class="my-class">Hello</div>
    </body>
</html>

html > after inlining with PreMailer.net

<html style="--my-css-color-var: blue;">
    <body>
        <div style="color: var(--my-css-color-var)">Hello</div>
    </body>
</html>

Which doesn't work with web mail (at least Gmail because they strip html attributes).

Also current Bootstrap versions are now predominantly using css variables which only adds to this issue and a need to resolve the variables into their actual values.

Any guidance would be appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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