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

[css2] Percentages used to compute to auto; now compute to a percentage but are used as auto #1051

Closed
FremyCompany opened this issue Feb 21, 2017 · 7 comments
Assignees

Comments

@FremyCompany
Copy link
Contributor

It seems the group accepted an errata in 2013 regarding the computed value of the "height" property. I think that was a mistake and would like to revert that errata. It was applied in those two commits.

This change requires to complexify all other specs in order to deal with the case of "broken percentages" everywhere we want to deal with the "auto" case. Since most specs didn't this is bound to continue to cause issues when developers reimplement specs or part of specs, like what happened in this Chrome issue.

Other specs continue to assume the old behavior, like css-sizing (in multiple places). Furthermore, it specifies this behavior for other values like fill-content etc when they can't resolve, like we do for percentages.

Note that percentages resolved against the intrinsic sizes (max-content, min-content, fit-content) will compute to auto, as defined by CSS 2.1.

[...] if the computed inline-size of the block is fit-content, auto, or stretch, its min-content inline-size contribution is its min-content inline size plus any inline-axis margin, border, and padding.

It is appropriate to resolve percentage heights on direct children of table cells if the cell is considered to have its height specified explicitly or the element is absolutely positioned, see CSS 2. It is further clarified that a cell is considered to have its height specified explicitly if the computed height of the cell [...] is a length or percentage.

cc @tabatkins @fantasai @dbaron @SimonSapin @bert-github

@FremyCompany FremyCompany changed the title [css2][css-sizing][css-tables] Percentages used to compute to auto, now compute to a percentage but are used as auto [css2] Percentages used to compute to auto, now compute to a percentage but are used as auto Feb 21, 2017
@FremyCompany FremyCompany changed the title [css2] Percentages used to compute to auto, now compute to a percentage but are used as auto [css2] Percentages used to compute to auto; now compute to a percentage but are used as auto Feb 21, 2017
@FremyCompany
Copy link
Contributor Author

We resolved in today's call to add some text in css-sizing to emcompass the notion of "height behaving as auto" that other specs can use and link to, so it is extra clear that ignored percentages are in fact considered in those cases where we currently incorrectly wrote "compute to auto".

We also need to edit at least css-sizing and css-text to refer to that concept (and maybe css 2?)

@mwenge
Copy link

mwenge commented Mar 1, 2017

Hi there, I'm not clear on the outcome here. Have y'all agreed to revert the erratum?

@FremyCompany
Copy link
Contributor Author

No the errata will stay, but we agreed the other specs needs to be updated so they take the errata in consideration. This was just forgotten when the errata was made, but the errata didn't intend to change the meaning of those specs.

Btw the errata seems supported in all browsers as this test shows:
https://jsfiddle.net/nLxyer2c/

This was the only expected effect of the errata. Anything else is probably a spec that needs to be updated.

@mwenge
Copy link

mwenge commented Mar 2, 2017

OK, so nothing for me to do in crbug.com/687551 that prompted this issue?

@FremyCompany
Copy link
Contributor Author

@mwenge You should work on returning to the old Chrome behavior that is also interoperable with other browsers. I will update the spec with the new wording as soon as @tabatkins has some cycle to update css-sizing and I can link to that.

@w3c w3c deleted a comment from SimonSapin Jul 18, 2017
tabatkins added a commit that referenced this issue Jul 18, 2017
@tabatkins
Copy link
Member

@FremyCompany Okay, added the term "behaves as auto" (and its obvious conjugations) to Sizing, and made sure that Sizing used the term where appropriate (only one spot in Sizing 3). Feel free to link to it in Tables now.

@FremyCompany
Copy link
Contributor Author

@tabatkins Thanks, will do 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants