Skip to content

Conversation

@xiaochengh
Copy link
Contributor

#94 has made a resolution that certain calc() mixing both lengths and percentages MUST be treated as auto instead of MAY. Updating spec accordingly.

Relevant WPT are updated in https://chromium-review.googlesource.com/c/chromium/src/+/1832619.

#94 has made a resolution that certain `calc()` mixing both lengths and percentages MUST be treated as `auto` instead of MAY. Updating spec accordingly.
@davidsgrogan
Copy link
Member

At first glance the simple s/MAY/MUST/ seems to prohibit treating calc(10% + 0) as 10%.

emilio: what about calc(10% + 0)?
... that's simplifies to 10% in all browsers
Rossen: yes we've resolved that previously

@emilio
Copy link
Collaborator

emilio commented Oct 2, 2019

That is a good point... #3482 (comment) seems to imply it should be treated the same:

calc(% + 0px) vs calc(%)

Sure. There's no case in which these two should be different. Lengths never have magical behavior, so adding it to a % shouldn't add any complications, and in the rare cases where length+% is different than just resolving the % and adding the two together (bg-position), a 0px length is still a no-op.

0 and thus introduce computed-time division-by-zero. -->

Given the complexities of width and height calculations on table cells and table elements,
math expressions mixing both percentages and lengths for widths and heights on
Copy link
Contributor Author

@xiaochengh xiaochengh Oct 2, 2019

Choose a reason for hiding this comment

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

Suggested change
math expressions mixing both percentages and lengths for widths and heights on
math expressions mixing both percentages and non-zero lengths for widths and heights on

According to #3482, it is safe to drop 0 length from <length-percentage>. Then how about making it explicit here?

Copy link
Member

Choose a reason for hiding this comment

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

According to #3482, it is safe to drop 0 length from . Then how about making it explicit here?

SGTM. As far as I can tell, the resolution from #3482 isn't in any spec. Are you proposing to add it here explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tabatkins Could you help?

I'm not familiar with the editing process. What should we do here?

@FremyCompany
Copy link
Contributor

LGTM (but I'm not the editor of that spec)

@tabatkins tabatkins merged commit 6c3a3ec into w3c:master Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants