New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): strip scoped selectors from @font-face
rules
#41815
fix(compiler): strip scoped selectors from @font-face
rules
#41815
Conversation
805aaff
to
fe9cecd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petebacondarwin thanks for the fix 👍
I really like the PR description and I'm wondering if we can move some of that content (or actually all of it) to the _stripScopingSelectors
function docs as an additional context for future maintenance?
Added the comment. Marking for merge, pending the outcome of the presubmit. |
`@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 angular#41751
fe9cecd
to
6a01493
Compare
`@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
`@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
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
@font-face
rules cannot contain nested selectors. Nor can they benested 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