Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow undefined color when using css/shadow #94

Open
Itherael opened this issue Oct 1, 2024 · 0 comments
Open

Allow undefined color when using css/shadow #94

Itherael opened this issue Oct 1, 2024 · 0 comments

Comments

@Itherael
Copy link

Itherael commented Oct 1, 2024

When transforming shadows without a color using css/shadow, the color is set to undefined.

"custom-shadow-stroke": {
    "$type": "shadow",
    "$value": {
    "offsetX": 0,
    "offsetY": 0,
    "spread": "2px",
    "inset": true
    }
}

This will generate the following CSS:

--custom-shadow-stroke: 0 0 0 2px undefined inset;

The motivation for this empty color is to allow using two different css variables when defining a box-shadow. For example:

box-shadow: var(--custom-shadow-stroke) var(--custom-shadow-color);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant