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] Serialization of a summation needs to account for negatives #4129

Closed
emilio opened this issue Jul 19, 2019 · 2 comments
Closed
Labels

Comments

@emilio
Copy link
Collaborator

emilio commented Jul 19, 2019

https://drafts.csswg.org/css-values-4/#calc-serialize says:

Serialize all the terms, then join them into a single string, with " + " between each term. Return the result.

Instead it should be smarter, all browsers serialize calc(10em - 10px) as calc(10em - 10px), not as calc(10em + -10px), which is what the spec would require.

cc @tabatkins

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 19, 2019
…on. r=heycam

https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

--HG--
extra : moz-landing-system : lando
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jul 19, 2019
…on. r=heycam

https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 19, 2019
https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1567349
gecko-commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
gecko-integration-branch: central
gecko-reviewers: heycam
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 19, 2019
https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1567349
gecko-commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
gecko-integration-branch: central
gecko-reviewers: heycam
@Loirooriol
Copy link
Contributor

Same as #3335?

@emilio
Copy link
Collaborator Author

emilio commented Jul 29, 2019

Indeed, thanks :)

@emilio emilio closed this as completed Jul 29, 2019
natechapin pushed a commit to natechapin/wpt that referenced this issue Aug 23, 2019
https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1567349
gecko-commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
gecko-integration-branch: central
gecko-reviewers: heycam
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…on. r=heycam

https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

UltraBlame original commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…on. r=heycam

https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

UltraBlame original commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…on. r=heycam

https://drafts.csswg.org/css-values-4/#calc-serialize:

> Sort the terms in the following order:
>  The number, if present
>  The percentage, if present
>  The dimensions, ordered by their units ASCII case-insensitive alphabetically
>  Comparison, trigonometric and exponential functions, in the order they appeared in the original expression.

So em goes before px. I filed w3c/csswg-drafts#4129 on
the second part of that algorithm not matching any browser.

These are tests that are marked as only failing in Firefox because we're the
only following the spec. #funtimes

Differential Revision: https://phabricator.services.mozilla.com/D38593

UltraBlame original commit: 0bbd8e64cb9cbef70d12bcf502a8948882b63fe9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants