Skip to content

[css-values] "explicitly undefined" #8865

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
annevk opened this issue May 22, 2023 · 5 comments
Closed

[css-values] "explicitly undefined" #8865

annevk opened this issue May 22, 2023 · 5 comments
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work

Comments

@annevk
Copy link
Member

annevk commented May 22, 2023

It would be better to use Infra's implementation-defined term for the language introduced in 328ddb3. It's also not exactly undefined as hopefully only one of two behavior is allowed (and thus can be tested for). Crashing doesn't seem exactly acceptable here.

cc @emilio @tabatkins @jfkthame @Loirooriol @dholbert @CanadaHonk

@annevk
Copy link
Member Author

annevk commented May 22, 2023

I guess I should also note that I'm a bit worried that leaving this choice up to implementations will essentially require market leader behavior, but perhaps it's an extremely unlikely thing to end up relying upon?

@tabatkins
Copy link
Member

No, the issue is that literally any numeric result is valid (the whole range from infinity to negative infinity), depending on how close your internal representation is to the asymptote and whether it's slightly smaller or slightly larger. It's inherently untestable without specifying an internal numeric representation, which CSS has intentionally always avoided, to allow impls to use more or less precision, and different types of precision, in various places for optimization reasons.

(You can write tests for this in JS because it's defined in terms of IEEE 64-bit floats.)

Happy to switch over to Infra's term, tho. We use "undefined" or "explicitly undefined" in several places in CSS and have for years, but converging on language is generally good.

@tabatkins
Copy link
Member

Lmk if this edit is an acceptable resolution to your issue?

@annevk
Copy link
Member Author

annevk commented May 23, 2023

I suspect that in practice websites will end up depending on a particular representation and implementations will be somewhat forced to use that, but I guess we'll see.

@tabatkins
Copy link
Member

If that ends up being the case, we'll deal with when it does happen. (In the meantime, the request to make it undefined was by Firefox, and they're the ones of the Big 3 engines that are most at risk of freeze-in here, so I'm happy to let them make that decision.)

@tabatkins tabatkins added Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. and removed Commenter Response Pending labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial 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