New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 703984 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Styling default slot content with ::slotted

Project Member Reported by hayato@chromium.org, Mar 22 2017

Issue description

Please see https://github.com/w3c/webcomponents/issues/631.

`::slotted` should consider slot's children too.
 

Comment 1 by kochi@chromium.org, Mar 27 2017

Status: Started (was: Assigned)

Comment 3 by kochi@chromium.org, Oct 17 2017

Cc: kochi@chromium.org
Components: -Blink>DOM>ShadowDOM Blink>CSS
Owner: ----
Status: Available (was: Started)
Making this avaialble to someone in Blink>CSS.

Comment 4 by kochi@chromium.org, Oct 17 2017

FYI, in the previous attempt I tried to apply fallback contents in
document (i.e. slot element is in document tree), but now you don't have to.
So the code should be simpler.

Comment 5 by shend@chromium.org, Oct 17 2017

Labels: Hotlist-Interop Update-Quarterly
Labels: Code-Resolver

Comment 7 by shend@chromium.org, Nov 27 2017

Labels: ApproachableBug
Looks approachable, especially with kochi's WIP patch.

Comment 8 by kochi@chromium.org, Dec 5 2017

Re comment#4
the discussion on https://github.com/w3c/webcomponents/issues/631
may sound slot's children in document tree should also
return its fallback contents, but the latest HTML spec says:

https://html.spec.whatwg.org/multipage/scripting.html#dom-slot-assignednodes
The assignedNodes(options) method, when invoked, must run these steps:
 1. If the value of options's flatten member is false, then return this element's assigned nodes.
 2. Return the result of finding flattened slotables with this element.

So "2." has to be applied for assignedNodes({flatten: true}) case,
and "finding flattened slotables" algorithm says:

https://dom.spec.whatwg.org/#find-flattened-slotables
To find flattened slotables for a given slot slot, run these steps:
 1. Let result be an empty list.
 2. If slot’s root is not a shadow root, then return result.
 ...

So "2." applies in the document tree, thus slot.assignedNodes({flatten:true})
returns an empty array when the slot is in a document tree.
Labels: -Update-Quarterly
Project Member

Comment 10 by sheriffbot@chromium.org, Dec 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment