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-sizing] behavior of percents in max-width/height and width/height on max-content contribution of replaced elements is undefined #3018

Closed
dbaron opened this issue Aug 14, 2018 · 5 comments

Comments

@dbaron
Copy link
Member

dbaron commented Aug 14, 2018

The resolution to #765 (I think; it doesn't link to its commits so I'm not sure the text wasn't introduced elsewhere) defines a bunch of cases in Percentage sizing:

  • the first bullet point defines all intrinsic size contributions (min-content and max-content) for non-replaced elements for the max size properties and preferred size properties
  • the second bullet point defines the min-content contribution for replaced elements for the max size properties and preferred size properties
  • the third bullet point defines all intrinsic size contributions for all elements for the min size properties

Nothing in this section defines the behavior of the max-content contribution for replaced elements for the max size properties and preferred size properties.

(I was trying to finish up my patches to implement that section, and stumbled on this problem. It turns out that my initial set of patches tried to fix min-content contributions only, but the problem I ran into is that I need to fix max-content contributions to match because our code asserts if the max-content contribution is smaller than the min-content contribution.)

@dbaron dbaron added the css-sizing-3 Current Work label Aug 14, 2018
@dbaron dbaron changed the title behavior of percents in max-width/height and width/height on max-content contribution of replaced elements is undefined [css-sizing] behavior of percents in max-width/height and width/height on max-content contribution of replaced elements is undefined Aug 14, 2018
@FremyCompany
Copy link
Contributor

would be good to add a testcase to exemplify this problem; are we talking about a floated svg element with a max-height or something like that?

@fantasai
Copy link
Collaborator

IIRC, replaced max-content contributions was supposed to fall into the first bullet point (resolved same as non-replaced, i.e. no special rule about zeroing things out).

@tabatkins
Copy link
Member

aka treated as auto

@tabatkins
Copy link
Member

We filled in the missing case, and added a summarizing table, in c0a4c57.

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