-
Notifications
You must be signed in to change notification settings - Fork 375
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
Need to update CSS Scoping for closed shadow tree #293
Comments
Could you elaborate? I don't see why cascading order should be aware of a closed mode, given that a selector defined in ancestor trees is never applied to a node in a closed shadow tree. |
We still need to say what happens to inheritance, I think. |
Yeah, but that sounds an orthogonal issue to me. That's not what the cascading order should mention. BTW, Shadow DOM had a feature of |
I meant that, I agree with what you wrote and I believe it is a common understanding among us, but I could not find definitions in relevant specs (Shadow DOM spec, CSS Scoping spec, nor in the @rune-opera's proposal). I suppose there are several edge cases that I think it's worth to clarify, such as:
Sorry that I haven't given a full thought yet and dumping as I think, but these look a bit complicated, no? (hayato: Sorry, I accidentally edited this comment. I hope I reverted it correctly :). |
It does seem though that ideally all this is defined in CSS directly. Especially once we move Shadow DOM into DOM it would not make sense to define adhoc adjustments to CSS cascade and inheritance there. |
Agreed, but I would prefer making discussions and a consensus here, then update the CSS spec. @rune-opera and we tried to discuss at www-style, but didn't really work well without all background we discussed here. So I'd like to make sure everyone is happy with what we want, then update the CSS Scoping spec. I guess it'd be easier for the editors of CSS Scoping to update the spec if the proposal is a consensus of Shadow DOM experts in this WG. |
In all cases, I think we don't need to modify the proposed cascading order. To me, your concerns look to depends on the definition about how each selector should behave across shadow boundaries.
I think we don't need to modify the proposal in either case. That's the problem about how a selector matches an element in a child tree.
Yes. Note that it depends on the definition of
Yes. Note that it depends on the definition of |
Ah, got the points. I was taking the proposal as an patch to CSS Cascading/Scoping, while you're thinking it only for Cascading Order, correct? I guess then the title of this issue is incorrect, I should say "Need to update CSS Scoping for closed shadow tree." Are we in sync then? |
I got it. That makes sense. My point is:
The proposal [3] is trying to update only "3.3 Shadow Cascading & Inheritance". [1] https://drafts.csswg.org/css-scoping/#selectors |
It looks we have to add one more action item:
The current ability of We believe that a simple selector meets the requirements. Quoted from the Polymer developer:
|
Given that |
I'm somewhat confused about Hayato's last 3 comments in this thread. If not, can we close this issue? |
Which part of the comment is confusing? FYI. The semantics of |
You had 3 points (below is my understanding):
For 1, it might still be relevant, but for CSS Selectors spec? https://drafts.csswg.org/selectors/ Then what is keeping this issue open? |
Yeah, that's what I said and I got no response from anyone. |
It seems like the last meeting's consensus was that we want to minimize the difference between closed and open modes in terms of styling behaviors so I think 2 is not controversial. We'll use whatever default we'd pick for both open and closed modes. For 1, we (Apple) would not want to keep For 3, we (Apple) are fine with restricting it to the simple selector especially for V1. However, we might want to keep semantics for |
Looks great to me, closing. |
Cascade Order for CSS rules from different shadow trees should be aware whether a tree is closed or not, and probably define different rules if closed.
Pointed out by @rniwa in an off-list conversation.
The text was updated successfully, but these errors were encountered: