Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Nested custom properties with preserve false does not work correctly #233

Open
Dai7Igarashi opened this issue Nov 18, 2020 · 1 comment
Open

Comments

@Dai7Igarashi
Copy link

In fallback pattern using "preserve: false", custom properties remain and "root" is deleted, so it can't check the custom properties like below.

[preserve: false]

▼ before
:root {
  --my-blue: blue;
}

// "--my-red" does not exist
.sample {
  color: var(--my-red, var(--my-blue))
}

▼ after
.sample {
  color: var(--my-blue) <-- can't resolve the custom properties
}

if "preserve: true", it's ok.

[preserve: true]

▼ before
:root {
  --my-blue: blue;
}

// "--my-red" does not exist
.sample {
  color: var(--my-red, var(--my-blue))
}

▼ after
:root {
  --my-blue: blue;
}
.sample {
  color: var(--my-blue) <-- it can resolve the custom properties
}
@msereniti
Copy link

Upvote this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants