Skip to content

Hashing on css variables #1241

Open
Open
@fa93hws

Description

@fa93hws

Feature Proposal

css variable: https://developer.mozilla.org/en-US/docs/Web/CSS/var

There are cases where we want to use the css variable instead of the @value for the responsive design.
Say assume I have

<div class="parent">
  <div class="child">
  </div>
</div>

I would like to have some variable to synchronize some property between child and parent and this variable is designed to be responsive so @value can not be used here.
Instead of overwrite each rule in @media, I would like to do something like: https://jsfiddle.net/g86efhas/2/

The problem is the css variable may leads to some name clash.
So is that possible to add the hash to css variable as well

Feature Use Case

Use css-variables and forget about name clashing.
css(--var) -> css(--src-pages-foo-bar-var)

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