Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): strip scoped selectors from
@font-face
rules (#41815)
`@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector. Normally this would be a syntax error by the author of the styles. But in some rare cases, such as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we can end up with broken css if the imported styles happen to contain `@font-face` rules. This commit works around this problem by sanitizing such cases (erasing any scoping selectors) during emulated ShadowDOM encapsulation style processing. Fixes #41751 PR Close #41815
- Loading branch information
1 parent
af12d8d
commit da6ed15
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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