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-layout-api] Should display: layout(x) work on any element? #796

Open
zcorpan opened this issue Aug 15, 2018 · 4 comments
Open

[css-layout-api] Should display: layout(x) work on any element? #796

zcorpan opened this issue Aug 15, 2018 · 4 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented Aug 15, 2018

See whatwg/html#3915 where I wonder if layout() should work on fieldset

@zcorpan
Copy link
Member Author

zcorpan commented Aug 15, 2018

cc @bfgeek

@AmeliaBR
Copy link

Alternative question:

Can display: layout(-browser-internal-function) be used to finally specify fieldset and legend behavior in standard CSS syntax?

@zcorpan
Copy link
Member Author

zcorpan commented Aug 15, 2018

@AmeliaBR no, web compat requires magic if author CSS changes 'display'. But I have a different proposal at whatwg/html#3912

@css-meeting-bot
Copy link
Member

The Houdini Task Force just discussed Should layout() apply to every element?, and agreed to the following:

  • RESOLVED: display:layout() works on fieldset, same as display:grid or display:flexbox do. (It applies to the inner box, and does not lay out the rendered legend.)
  • RESOLVED: Publish a new version of the WD
The full IRC log of that discussion <emilio> Topic: Should layout() apply to every element?
<emilio> Github: https://github.com//issues/796
<emilio> TabAtkins: If display works on an element it display: layout() should work
<emilio> cbiesinger: There's a bunch of requests to make display work on fieldsets
<emilio> TabAtkins: at which point layout() should work
<emilio> emilio: fieldset display is weird because it only affects the display of the anonymous block inside it, at least on Gecko
<TabAtkins> TabAtkins: So the "inner" display values work, just not the outer ones. (no block/inline, but flex/grid is fine)
<TabAtkins> layout() is an "inner" display value.
<TabAtkins> So it should work.
<emilio> emilio: should you call layout() on the legend?
<emilio> TabAtkins: I'm happy to say legend is outside of your rendering, and that layout() is called for the contents of your inner box
<emilio> Rossen: so is the resolution that display layout() should work on any element that accepts a display value?
<emilio> emilio: what about replaced?
<rego> JFYI, "display: grid" on <fieldset> works in Firefox, Safari, Edge but not in Chromium
<TabAtkins> (Because that's consistent with the behavior of dipslay:grid on it; it only lays out the inner box, which doesn't include the <legend>)
<emilio> TabAtkins: it only honors the outer display value, like setting display: grid on an image you just get a block
<emilio> emilio: what outer display does layout() have? block?
<emilio> TabAtkins: yeah, thought we may want to add inline-layout() to handle that
<emilio> heycam: so display: layout() for an svg doesn't apply right?
<emilio> TabAtkins: hmm, so svg elements do honor display none... needs a bit better definition
<emilio> iank_: so it's not a layout-api issue right?
<emilio> TabAtkins: no, css-display
<TabAtkins> (or the theoretical svg-layout spec I've been threatening to write for a few years)
<emilio> Rossen: so... We have a resolution?
<emilio> TabAtkins: proposal: should work on fieldset
<emilio> Rossen: the title seemed a bit more general
<emilio> TabAtkins: I think except svg, fieldset is the only really special thing
<TabAtkins> Proposed resolution: display:layout() works on fieldset, same as display:grid or display:flexbox do. (It applies to the inner box, and does not lay out the rendered legend.)
<emilio> RESOLVED: display:layout() works on fieldset, same as display:grid or display:flexbox do. (It applies to the inner box, and does not lay out the rendered legend.)
<emilio> Rossen: other issues?
<emilio> iank_: nope
<emilio> RESOLVED: Publish a new version of the WD
<emilio> bkardell_: I'm wondering how much effort we're spending into throttled network stuff, or other way the developer could apply layout when loads are slow and such?
<bkardell_> s/bkardell_/philipwalton
<emilio> iank_: The promise return from the module load... You can use that when all the JS stuff loaded there is done
<emilio> iank_: But it'd be interesting to have something like font loading works
<emilio> iank_: I think we need to be able to load worklets declaratively
<emilio> iank_: there has been talk in the past of a top level promise to the document
<emilio> iank_: which it may be useful to allow people to wait for critical parts of the UI and such
<emilio> iank_: but that's a separate discussion
<emilio> philipwalton: is there an issue for that?
<emilio> iank_: if you could file it'd be great
<emilio> TabAtkins: we definitely need to talk to the preload people to be able to load modules
<emilio> iank_: and the TAG should probably be involved yeah
<TabAtkins> <br dur=20min>
<emilio> Rossen: So that's all for layout, let's take a break and do typed OM when back

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