fix(compiler): remove dedicated support for legacy shadow DOM selectors#68667
Open
mattrbeck wants to merge 1 commit into
Open
fix(compiler): remove dedicated support for legacy shadow DOM selectors#68667mattrbeck wants to merge 1 commit into
mattrbeck wants to merge 1 commit into
Conversation
Remove `_shadowDOMSelectorsRe` and `_convertShadowDOMSelectors` from `shadow_css.ts` so that `::shadow`, `::content`, `/shadow-deep/`, and `/shadow/` are no longer treated specially or stripped from user CSS. Instead, they are naturally scoped like standard selectors. Also remove the legacy failing test from `shadow_css_spec.ts`.
9ee8c8c to
d056668
Compare
JeanMeche
approved these changes
May 11, 2026
JoostK
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
_shadowDOMSelectorsReand_convertShadowDOMSelectorsfromshadow_css.tsso that::shadow,::content,/shadow-deep/, and/shadow/are no longer treated specially or stripped from user CSS. Instead, they are naturally scoped like standard selectors. Also remove the legacy failing test fromshadow_css_spec.ts.Support for these selectors and combinators has existed since 2015, introduced in d67f029 before the Shadow DOM spec was even finalized. They were not specifically called out as features, but simply part of a port from the web component prototype. In fact, Angular today just removes them from the source. It does nothing to implement them even by their prototype specification.
This change simply updates Angular to treat these legacy selectors that never landed in the spec as if they're any other selector.