Re: [csswg-drafts] [css-shadow-parts][css-scoping] Allow ::part after ::slotted (#3896)

Another use case:

**Technical** targeting elements exposed as parts in slotted custom elements to apply a z-index with an 'outside'/the proper stacking context, so when those targeted elements also have position: sticky (and top: 0px), they stack on top of eachother when scrolling, instead of the current stuck element being pushed up (and out of view) when the next targeted element gets towards the top

**User facing** a scrolling container with multiple slotted custom elements that have headers and a (varying length) content and when scrolling down you want the headers to stick to the top of the container (when scrolling down) and to be rendered on top of eachother (instead of the next header pushing the previous one upwards)

Right now the only way to achieve this (afaict) is to add the selector to target the parts to the global css



-- 
GitHub Notification of comment by p-bakker
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3896#issuecomment-2317001245 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 29 August 2024 08:22:37 UTC