- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Sep 2018 16:50:20 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Need to agree on when LinkStyle.sheet gets updated in shadow trees.`, and agreed to the following: * `RESOLVED: Disconnected elements don't have stylesheets` <details><summary>The full IRC log of that discussion</summary> <dael> Topic: Need to agree on when LinkStyle.sheet gets updated in shadow trees.<br> <dael> github: https://github.com/w3c/csswg-drafts/issues/3096<br> <dael> emilio: cssom spec the first spec when an element has a stylesheet to html. Html doesn't spec. impl did different things. Gecko loads stylesheets in shadow trees. Blink and webkit don't/ Fine spec webkit and tying loading a sheet to connected to a document. Makes shadowroot stylesheets useless unless root is connected<br> <dael> emilio: Overall that makes sense. Example a styleelement.sheet is also used when style is not in doc.<br> <dael> astearns: Any concerns?<br> <dael> astearns: Makes sense to me<br> <dbaron> s/used/useless/<br> <dael> emilio: Fine for me if we get a resolution I'll make edits<br> <dael> astearns: Proposal: Spec webkit/blink behavior for disconnected shadown roots<br> <dael> emilio: Disconnected elements don't have stylesheets<br> <dael> astearns: This goes into html?<br> <dael> emilio: May need to. I'll discuss with html editors who should spec. it's right now nowhere<br> <dael> astearns: Prop: Disconnected elements don't have stylesheets<br> <dael> astearns: Objections?<br> <dael> Rossen_: Disconnected elements have no stylesheets. If I make an element through OM and make a style element the contents are dropped?<br> <dael> emilio: Not dropped, but they're not associated.<br> <chris> what about style elements in the disconnected element? or style attributes?<br> <dael> Rossen_: Once I merge into main tree style sheet becomes<br> <dael> emilio: Yes, it's non-null<br> <dael> Rossen_: There's a temp style sheet not accessible through OM, but it's created and retained for lifetime of subtree<br> <dael> Rossen_: My assertion is there is an actual style sheet not accessible through OM until element is merged into main tree<br> <dael> emilio: IN gecko we have no style sheet. We parse when becomes connected<br> <dael> Rossen_: So you're saying if the stylesheet has external reference you won't download until merged into tree<br> <dael> emilio: Right. THat's only thing HTML specs.<br> <dael> Rossen_: Then I'm fine with the proposal. That answers my question<br> <dael> plinss: If you're creating a custom element you cannot manipulate stylesheet through cssom until connected to document.<br> <dael> Rossen_: That's current<br> <dael> emilio: You don't want to trigger loads. Rune said he's in agreement. You can create stylesheet via inner html but can't access via OM<br> <dael> Rossen_: This is also related to our previous discussions abotu sso on disconnected trees. We'd give them stock style answers was our conclusion so you don't trigger style computation. That's why asked if we'd spec so downloads don't occur until merge with main<br> <dael> plinss: If I create web component it cannot be made ready until plug into doc<br> <dael> Rossen_: Correct<br> <dael> plinss: So I plug it in wait for style to download and parse, get a flash of unstyled and then can manipluate.<br> <dael> Rossen_: Not defending, but it is the current<br> <dael> plinss: Do we want this?<br> <dael> emilio: For small components you use inline styles and defer parsing until you insert it.<br> <dael> Rossen_: plinss perhaps is alluding to a separate issue that perhaps we need a trigger that forces download when not connected.<br> <dael> plinss: At least parse and manipulate<br> <dael> Rossen_: Yeah, this is a fair point.<br> <AmeliaBR> Remember, there is always <link rel="preload" as="stylesheet" />, which you can add to the main document to trigger a download without applying styles just yet.<br> <dael> emilio: I think there are proposals in Google for document.tree to allow. Wouldn't work like current style sheets. It's a different API. But I think would address that use case<br> <dael> plinss: This is something I ran into in the last week or two. I want to set values of custom prop and I can't do it through clean APIs. We should allow authors to manipulate style sheets before connection<br> <dael> emilio: I thik google proposal address that. I don't think we want current style and link to trigger downloads<br> <dael> plinss: Understood. Not proposing we change legacy. There is a use case here.<br> <dael> emilio: File as a sep. issue?<br> <dael> plinss: Fair enough.<br> <dael> astearns: plinss do you want to investigate current proposals and file an issue if they're not enough?<br> <dael> plinss: Yes<br> <dael> astearns: Proposal: Disconnected elements don't have stylesheets<br> <dael> astearns: Obj?<br> <dael> RESOLVED: Disconnected elements don't have stylesheets<br> <emilio> plinss: https://github.com/w3c/webcomponents/issues/468 is what comes to mind<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3096#issuecomment-420719482 using your GitHub account
Received on Wednesday, 12 September 2018 16:50:22 UTC