-
Notifications
You must be signed in to change notification settings - Fork 668
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-fonts-4] font-stretch valid values. #2591
Comments
Also cc @drott. @FremyCompany, what does Edge do here? I couldn't test with a build that supported percentages in |
Interestingly, in Chrome i get true for
even though such a tiny value appears to compute to 0%. |
I checked MSEdge, and confirmed that |
Yes, if we the spec stays unchanged, it's a bug in Chrome, we reject for <= 0, should be easy to fix by changing the parse-time check. It's a different discussion how much sense is in 0% as a stretch value. Filed crbug.com/834236. |
Doesn't matter whether it makes sense or not; percentages are floats, and so disallowing 0% would make the valid syntax an open range, which is disallowed as a general spec-design rule. (For example, it makes it unclear what value Given that this is just a factor in the font-selection, not something used directly, there's nothing wrong with 0%; it just means you'll select the narrowest available font. |
Closing because the spec is clear, Chrome just has a bug. |
Thanks for the clarification, makes sense. |
…ts. r=jwatt The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. MozReview-Commit-ID: CNJ3LG71KRj
The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436048 gecko-commit: b61541f85293fa3fddd7edfe9863624f9a56e92b gecko-integration-branch: mozilla-inbound gecko-reviewers: jwatt
The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1436048 gecko-commit: b61541f85293fa3fddd7edfe9863624f9a56e92b gecko-integration-branch: mozilla-inbound gecko-reviewers: jwatt
Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511
Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511
Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardi@chromium.org> Reviewed-by: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#556568}
Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardi@chromium.org> Reviewed-by: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#556568}
Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardi@chromium.org> Reviewed-by: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#556568}
Automatic update from web-platform-testsAllow 0% in font-stretch Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardi@chromium.org> Reviewed-by: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#556568} -- wpt-commits: bbb732773d07230e07f95c551e09b851d450effa wpt-pr: 10866
…ts. r=jwatt The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. MozReview-Commit-ID: CNJ3LG71KRj UltraBlame original commit: b61541f85293fa3fddd7edfe9863624f9a56e92b
…ts. r=jwatt The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. MozReview-Commit-ID: CNJ3LG71KRj UltraBlame original commit: b61541f85293fa3fddd7edfe9863624f9a56e92b
…ts. r=jwatt The test adjustments are: A subtest of variable-presentation-attribute.html is marked as failure, pending resolution of w3c/csswg-drafts#2605. font-parse-numeric-stretch-style-weight.html is updated to: * handle calc per spec (invalid at computed-value time), see w3c/csswg-drafts#2590 * Accept 0% in font-stretch: w3c/csswg-drafts#2591 * Accept font-weight descriptor ranges where the start is greater than the end, per https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-weight, which says: > User agents must swap the computed value of the startpoint and endpoint > of the range in order to forbid decreasing ranges. font-shorthand.html is updated to presumably fix a copy-paste error, where "oblique 45deg" was expected to compute to "oblique", which is wrong. The rest is removing failure annotations. MozReview-Commit-ID: CNJ3LG71KRj UltraBlame original commit: b61541f85293fa3fddd7edfe9863624f9a56e92b
Automatic update from web-platform-testsAllow 0% in font-stretch Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardichromium.org> Reviewed-by: Dominik Röttsches <drottchromium.org> Cr-Commit-Position: refs/heads/master{#556568} -- wpt-commits: bbb732773d07230e07f95c551e09b851d450effa wpt-pr: 10866 UltraBlame original commit: c1590c4fac5713fa4330f04371b486015fca7d82
Automatic update from web-platform-testsAllow 0% in font-stretch Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardichromium.org> Reviewed-by: Dominik Röttsches <drottchromium.org> Cr-Commit-Position: refs/heads/master{#556568} -- wpt-commits: bbb732773d07230e07f95c551e09b851d450effa wpt-pr: 10866 UltraBlame original commit: c1590c4fac5713fa4330f04371b486015fca7d82
Automatic update from web-platform-testsAllow 0% in font-stretch Per w3c/csswg-drafts#2591, 0% should be an allowed value in font-stretch. Remove the check that percentages are >= 0 for font-stretch, as any negative non calc values are already rejected by kValueRangeNonNegative. Also update a test of valid calc values in font-stretch, as even though they are outside the allowed range, they should not be subject to parse-time constraints. Bug: 834236 Change-Id: I0e728d8cc89b45bac7be956a7662533d4775c511 Reviewed-on: https://chromium-review.googlesource.com/1046926 Commit-Queue: Chris Nardi <cnardichromium.org> Reviewed-by: Dominik Röttsches <drottchromium.org> Cr-Commit-Position: refs/heads/master{#556568} -- wpt-commits: bbb732773d07230e07f95c551e09b851d450effa wpt-pr: 10866 UltraBlame original commit: c1590c4fac5713fa4330f04371b486015fca7d82
https://drafts.csswg.org/css-fonts-4/#font-stretch-prop says:
However Safari and Chrome at least treat
0%
as invalid:What's the expected thing here? Is it a typo in the spec, or should 0% really be allowed, and thus a bug in WebKit / Blink?
cc @litherum
The text was updated successfully, but these errors were encountered: