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-transforms] scale function and property % #4396

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

ewilligers
Copy link
Contributor

Allow percentages inside the scale functions,
and the scale property.

resolves #3399

@smfr
Copy link
Contributor

smfr commented Oct 4, 2019

This change should be made in css-transforms-2, not css-transforms-1.

@ewilligers
Copy link
Contributor Author

I have updated to PR to only involve css-transforms-2. I have also described serialization.

@ewilligers ewilligers added css-transforms-2 and removed css-transforms-1 Current Work labels Nov 19, 2019
@ewilligers
Copy link
Contributor Author

@tabatkins @smfr @grorg @hober please review

@@ -627,6 +627,10 @@ If three values are given,
this specifies a 3d scaling,
equivalent to the ''scale3d()'' function.

A <<percentage>> is equivalent to a <<number>>,
for example ''scale: 100%;'' is equivalent to ''scale: 1;''.
Numbers are used during serialization.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should move to section 4.1, about serialization.

@@ -878,6 +882,19 @@ The Transform Functions {#transform-functions}
=======================

The value of the 'transform' property is a list of <dfn>&lt;transform-function></dfn>. The set of allowed transform functions is given below. Wherever <<angle>> is used in this specification, a <<number>> that is equal to zero is also allowed, which is treated the same as an angle of zero degrees. A percentage for horizontal translations is relative to the width of the <a>reference box</a>. A percentage for vertical translations is relative to the height of the <a>reference box</a>.
A percentage in a scale function is equivalent to a number, and serializes as a number.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should move to section 4.1, about serialization.

@smfr
Copy link
Contributor

smfr commented Nov 20, 2019

Ah it's section 2.1 in transforms-2

@ewilligers
Copy link
Contributor Author

Section 2.1 is about computed value serialization. Percentages in scale serialize as numbers even in the specified value. Are you requesting a new section about specified value serialization?

@smfr
Copy link
Contributor

smfr commented Nov 21, 2019

It wasn't clear from "serializes as a number" whether you were talking about specified or computed. Maybe clarify?

Allow percentages inside the scale functions,
and the scale property.

resolves w3c#3399
@ewilligers
Copy link
Contributor Author

It wasn't clear from "serializes as a number" whether you were talking about specified or computed. Maybe clarify?

Updated.

@ewilligers
Copy link
Contributor Author

Waiting for approval from an editor. css-transforms-2/Overview.bs lists

  • Tab Atkins Jr.
  • Simon Fraser
  • Dean Jackson
  • Theresa O'Connor

Base automatically changed from master to main February 2, 2021 19:45
@ewilligers ewilligers merged commit 93243e5 into w3c:main Feb 18, 2021
@ewilligers ewilligers deleted the scale-percentage branch February 18, 2021 01:49
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 27, 2021
The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale

Bug:  1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 27, 2021
The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale

Bug: 1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2703674
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/master@{#867008}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 27, 2021
The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale

Bug: 1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2703674
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/master@{#867008}
pull bot pushed a commit to luojiguicai/chromium that referenced this pull request Mar 27, 2021
The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale


Bug: 1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2703674
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/master@{#867008}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 27, 2021
…ges., a=testonly

Automatic update from web-platform-tests
CSS Transforms: scale() accepts percentages.

The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale

Bug: 1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2703674
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/master@{#867008}

--

wpt-commits: 808a9ed80e45a9da615fb930d212fcc7461648e6
wpt-pr: 28267
Chi-teck added a commit to Chi-teck/content-1 that referenced this pull request Jan 16, 2022
Chi-teck added a commit to Chi-teck/content-1 that referenced this pull request Jan 16, 2022
Chi-teck added a commit to Chi-teck/content-1 that referenced this pull request Jan 16, 2022
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
The functions  scale() scaleX() scaleY() scaleZ() scale3d()  and the
property  scale  each accept percentages, that serialize as numbers.

w3c/csswg-drafts#3399
w3c/csswg-drafts#4396
https://drafts.csswg.org/css-transforms-2/#transform-functions
https://drafts.csswg.org/css-transforms-2/#propdef-scale

Bug: 1179579
Change-Id: Icfbc42bf529c1c63045c3e918a6a1db2b14d1ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2703674
Commit-Queue: Eric Willigers <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/master@{#867008}
GitOrigin-RevId: f31adb81393ef56e06da6d2a3e5ec42ef19a25b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[css-transforms] Have scale function accept percentage value
4 participants