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] Resolution of math functions #2665

Closed
Loirooriol opened this issue May 9, 2018 · 2 comments
Closed

[css-values] Resolution of math functions #2665

Loirooriol opened this issue May 9, 2018 · 2 comments
Labels
css-values-4 Current Work

Comments

@Loirooriol
Copy link
Contributor

From https://drafts.csswg.org/css-values-4/#calc-notation,

A math function can be used wherever <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> values are allowed.

From https://drafts.csswg.org/css-values-4/#calc-type-checking,

A math function has a resolved type, which is one of <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer>.

From https://drafts.csswg.org/css-values-4/#type-checking-exprs,

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

Why are <number> and <integer> in #1 and #2 but not in #3?

Why are <resolution> and <flex> in #3 but not in #1 nor #2?

Is it necessary to repeat this list three times?

@tabatkins
Copy link
Member

tabatkins commented May 9, 2018

Why are <number> and <integer> in #1 and #2 but not in #3?

Accident.

Why are <resolution> and <flex> in #3 but not in #1 nor #2?

For flex, we have w3c/css-houdini-drafts#734 still open.

I... actually didn't realize calc() wasn't defined over <resolution>. I'll add it to that issue.

Is it necessary to repeat this list three times?

No, I need to do some more cleanup.

@tabatkins
Copy link
Member

Fixed the first.

Went ahead and edited the spec to fix the second, tho technically we do need the resolution to make it valid. But I think it's a foregone conclusion.

Fixed the third by removing one of the lists, along with a lot of now-redundant instructions for how to determine the type of a math function. Still need the other two, as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants