-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Why are custom properties not optional? #69
Comments
Hey, Thanks! :)
|
juice49
added a commit
to juice49/mistcss
that referenced
this issue
Nov 28, 2024
juice49
added a commit
to juice49/mistcss
that referenced
this issue
Nov 28, 2024
Thank you. PR opened! (: On
Having said that, it doesn't appear to be permissible to nest Not permissiblediv[data-component="test"] {
@property --color {
syntax: "<color>";
inherits: false;
initial-value: rebeccapurple;
}
outline: 10rem solid var(--color);
} Permissible, but can no longer be associated with an element@property --color {
syntax: "<color>";
inherits: false;
initial-value: rebeccapurple;
}
div[data-component="test"] {
outline: 10rem solid var(--color);
} Some half baked thoughts:
Maybe I'm overthinking it 😅. |
typicode
pushed a commit
that referenced
this issue
Nov 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was really impressed to learn Mist generates types for CSS custom properties. However, I'm wondering why the resulting
style
object types are not optional. Especially because—as far as I can tell—Mist can only discover custom properties that have been declared with a default value in a style. Style consumers may not wish to override this default.CSS input
TypeScript output (
--color
is not optional)Questions
@property
at-rule for discovering custom properties, and perhaps inferring information about them?Love the work that's been done here ❤️.
The text was updated successfully, but these errors were encountered: