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

[css-values-4] Incorrect resolved type of math functions representing <number> #7486

Closed
cdoublev opened this issue Jul 11, 2022 · 2 comments
Closed
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Jul 11, 2022

In CSS Values 4, 10.9. Type Checking:

Math functions themselves have types, according to their contained calculations:

  • [...]
  • The type of a sign() expression is «[ "number" → 1 ]».
  • The type of a sin(), cos(), or tan() expression is «[ "number" → 1 ]».
  • [...]
  • The type of a pow(), sqrt(), log(), or exp() expression is «[ "number" → 1 ]».

[...]

A math function resolves to <number>, <length>, <angle>, <time>, <frequency>, <resolution>, <flex>, or <percentage> according to which of those productions its type matches.

I do not understand the type defined for these functions. I expect «[ ]» because from CSS Typed OM:

A type matches <number> if it has no non-zero entries and its percent hint is null.

@tabatkins
Copy link
Member

...indeed, you're correct. Unsure why I wrote it that way.

@tabatkins tabatkins added Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. and removed Needs Edits labels Oct 10, 2022
@tabatkins
Copy link
Member

Done; I'm assuming this edit is fine since it's exactly what you asked for. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants