-
Notifications
You must be signed in to change notification settings - Fork 672
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-cascade] [css-scoping] [cssom] What should getComputedStyle return for an element which isn't in the flat tree? #1964
Comments
I guess this affects a few more specs. CSS Cascade says in https://drafts.csswg.org/css-cascade/#inheriting:
But there's no mention to the flattened tree anywhere in that spec. CSS Scoping says in https://drafts.csswg.org/css-scoping/#shadow-gloss:
|
Merging with #1548 |
@FremyCompany I think this is not a dupe of that. A detached subree is not the same as an element which is not on the flat tree. An element which is part of a document tree but not of the flat tree would be an unassigned child of a shadow host. Could you reopen, o clarify in #1548 that this is also going to be addressed in there? (I don't have the permission). Thanks! |
Cross-posting from 1548:
Ah, that should probably be added then; more than likely it's just an oversight. Using their parent's style is the closest approximation of the behavior that would happen whenever it gets slotted, so that looks reasonable to me. |
A comparison could be made to SVG |
The Working Group just discussed The full IRC log of that discussion<florian> topic: What should getComputedStyle return for an element which isn't in the flat tree?<florian> github: https://github.com//issues/1964 <florian> emilio: frremy added that, but we already resolved <florian> frremy: it's a bot bug, nothing to talk about <emilio> Was resolved on https://github.com//issues/1548#issuecomment-380383455 |
Okay, we've added a paragraph to section 4 that should cover this, per the resolution in #1548:
CSSOM still needs to define what should be output by gCS() when an element has no styles; it might already do so but I haven't checked. @emilio Can you confirm that this looks correct? |
Also pls edit cssom since you are the editor. :P |
Yeah that sounds good, thanks. https://drafts.csswg.org/cssom-1/#extensions-to-the-window-interface should already be doing the right thing. |
I believe implementations now just make it inherit from the default style, but that's not intuitive either, and in any case it's not specced, but should be.
The text was updated successfully, but these errors were encountered: