Closed Bug 1665822 Opened 5 years ago Closed 5 years ago

styles within shadow dom shouldn't not be able to affect all elements out of the shadow dom

Categories

(Core :: DOM: Core & HTML, defect)

80 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: f18846188605, Unassigned)

Details

(Keywords: testcase-wanted)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36

Steps to reproduce:

I write some css code in the shadow dom like " .container{width: 100%;}".

Actual results:

Then if elements out of the shadow dom have the class name "container", the style "width: 100%" would also applied to them.'

Expected results:

But according to the document(https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM), styles in a shadow dom are supposed to be hidden and seperated from other code on the page.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Hi reporter, could you provide a test script to reproduce this? Thanks.

Flags: needinfo?(f18846188605)

Yes, please, if you have a repro I'd be happy to look into it :)

Keywords: testcase-wanted

Lacks clear test case after 5 months.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(f18846188605)
You need to log in before you can comment on or make changes to this bug.