Inwerpsel / use-theme-editor

A React theme editor
GNU General Public License v3.0
4 stars 0 forks source link

Allow applying aliases to components of complex values #43

Open Inwerpsel opened 10 months ago

Inwerpsel commented 10 months ago

Currently, alias creation only substitutes the raw value on custom properties that are entirely identical to the replacement value.

There's a few common cases where it would make a lot of sense to substitute this value if it occurs inside a more complex CSS property value (e.g. calc, shorthands, other multi component values that are not shorthand).

e.g. creating alias blue zodiac for #123456 should also result in box-shadow: 10px 5px 5px #123456 changed to box-shadow: 10px 5px 5px var(--blue-zodiac)