Skip to content

[css-fonts-4] Accept all math functions in @font-palette-values #9313

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

Closed
cdoublev opened this issue Sep 5, 2023 · 3 comments
Closed

[css-fonts-4] Accept all math functions in @font-palette-values #9313

cdoublev opened this issue Sep 5, 2023 · 3 comments

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Sep 5, 2023

Functions such as calc(), var(), and env() are valid within the braces of a @font-palette-values rule.

https://drafts.csswg.org/css-fonts-4/#at-ruledef-font-palette-values

Obviously, I assume this means they are valid descriptor values, not descriptor names. But what is the reason (if any) to only accept calc() rather than all math functions?

@cdoublev cdoublev added the css-fonts-4 Current Work label Sep 5, 2023
@cdoublev
Copy link
Collaborator Author

cdoublev commented Sep 5, 2023

Never mind. Functions such as calc() are valid, which means all math functions are valid, I guess.

It seems a bit handwavey because I do not think attr(), mix(), toggle(), random-item(), should be valid. Maybe math functions, var(), env() should be explicitly allowed, as a restricted set.

svgeesus added a commit that referenced this issue Sep 6, 2023
@svgeesus
Copy link
Contributor

svgeesus commented Sep 6, 2023

It is a bit wooly, agreed. Better?

@cdoublev
Copy link
Collaborator Author

cdoublev commented Sep 6, 2023

Satisfied, thanks! 😇

Actually math functions seem to be valid anywhere (sorry to remember it so late) but it does not hurt to allow them explicitly in this context, I guess.

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

No branches or pull requests

2 participants