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-4] Do things with aspect ratio resolve percentages like replaced elements or non-replaced? #4638

Closed
bfgeek opened this issue Dec 30, 2019 · 8 comments
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-sizing-3 Current Work css-sizing-4

Comments

@bfgeek
Copy link

bfgeek commented Dec 30, 2019

There are subtle differences between how replaced elements resolve %-block-sizes, and how non-replaced elements resolve.

Should clarify if they resolve based on their type (replaced, vs. non-replaced), or resolve like replaced.

@fantasai
Copy link
Collaborator

@fantasai fantasai added the css-sizing-3 Current Work label Apr 15, 2020
@fantasai
Copy link
Collaborator

The other place that talks about replaced elements is this section in Grid: https://drafts.csswg.org/css-grid-1/#grid-item-sizing

@fantasai
Copy link
Collaborator

Another place that talks about replaced vs non-replaced is https://drafts.csswg.org/css-sizing-3/#percentage-sizing but it does not talk about aspect ratios except by deferring to the cyclic percentage definition linked earlier.

@fantasai
Copy link
Collaborator

Checked in a few changes:

  • Cleaned up the references from Grid in 72f2bb2
  • 21aa620 removes the reference to “replaced elements” in Sizing, but note that this should have no effect on anything, since afaik there's no case in which a non-replaced element’s max-content size depends on the size of its containing block.

@fantasai
Copy link
Collaborator

@bfgeek Are there other spec sections that you were concerned about (other than css-position, which needs general triage)?

@tabatkins
Copy link
Member

(We did a grep over the repository, and every remaining reference to replaced elements appears to be intentionally talking about replaced elements, not "things with aspect ratios". But my grep might have been simplistic and missed stuff, dunno.)

@bfgeek
Copy link
Author

bfgeek commented Apr 30, 2020

So there is a super edge case within tables for WebKit/Blink/EdgeHTML which relies on this distinction, (and we believe it is required for webcompat).
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=8045

Basically in the above example replaced elements resolve their values, differently to non-replaced.

I think it should be fine to keep this as a replaced vs. non-replaced distiction, rather than has-ar vs. no-ar.

@fantasai
Copy link
Collaborator

fantasai commented Jun 4, 2020

Closing per @bfgeek

@fantasai fantasai closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-sizing-3 Current Work css-sizing-4
Projects
None yet
Development

No branches or pull requests

3 participants