Skip to content

[css-values-4] Should ratios always get serialized with both components? #5561

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
cbiesinger opened this issue Sep 29, 2020 · 4 comments
Closed
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work

Comments

@cbiesinger
Copy link

https://drafts.csswg.org/css-values-4/#ratio-value

Currently, a ratio like "16 / 1" will get serialized as "16". But for a ratio, that seems unintuitive. Should ratios always get serialized with the slash?

(@dvoytenko fyi)

@cbiesinger cbiesinger added the css-values-4 Current Work label Sep 29, 2020
@tabatkins
Copy link
Member

I'm weakly in favor of this; relying on shortest-serialization-principle to turn 16 / 1 into 16 does feel a little weird here.

The question is just whether it's weirder for a ratio with an explicit /1 to get serialized without it, or for a ratio that's just a number to get serialized with a /1. I think the first one is weirder.

@cbiesinger
Copy link
Author

@fantasai
Copy link
Collaborator

fantasai commented Sep 29, 2020

Yes, they should be serialized with both components always. See @AmeliaBR's comments in #3757 (comment) which we resolved to accept in https://lists.w3.org/Archives/Public/www-style/2019Oct/0001.html

@cbiesinger
Copy link
Author

Thank you, the change looks good.

@fantasai fantasai added the Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. label Sep 29, 2020
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 16, 2020
Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 17, 2020
Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 17, 2020
Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Oct 17, 2020
Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}
pull bot pushed a commit to Mu-L/chromium that referenced this issue Oct 17, 2020
Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 27, 2020
…t-ratio, a=testonly

Automatic update from web-platform-tests
[AspectRatio] Fix serialization of aspect-ratio

Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}

--

wpt-commits: 8b94afceafbd71defd6e3a1f056321b7788e18c3
wpt-pr: 26148
sidvishnoi pushed a commit to sidvishnoi/gecko-webmonetization that referenced this issue Oct 27, 2020
…t-ratio, a=testonly

Automatic update from web-platform-tests
[AspectRatio] Fix serialization of aspect-ratio

Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}

--

wpt-commits: 8b94afceafbd71defd6e3a1f056321b7788e18c3
wpt-pr: 26148
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this issue May 1, 2025
…t-ratio, a=testonly

Automatic update from web-platform-tests
[AspectRatio] Fix serialization of aspect-ratio

Per these conversations:
w3c/csswg-drafts#5084
w3c/csswg-drafts#5561

R=futhark@chromium.org, xiaochengh@chromium.org

Bug: 1045668
Change-Id: I066809e31e4120b0c179235a101db5c74c3dd146
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480064
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818250}

--

wpt-commits: 8b94afceafbd71defd6e3a1f056321b7788e18c3
wpt-pr: 26148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants