-
Notifications
You must be signed in to change notification settings - Fork 27.1k
:host + ::ng-deep + @font-face produces wrong css #41751
Copy link
Copy link
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: CSS encapsulationstate: has PR
Milestone
Description
🐞 bug report
Affected Package
The issue is caused by package ¯\_(ツ)_/¯
Is this a regression?
¯\_(ツ)_/¯
Description
Using this
:host ::ng-deep {
@font-face {
// ...
}
}produces wrong css
@font-face {
-shadowcsshost-no-combinator ::ng-deep {
// ...
}
}🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
Angular Version: 11.0.8
Anything else relevant?
We use such approach to scope global katex css to component's level (and so keep this styles with lazy loaded component, not in app's global styles.scss), that renders katex equations
:host ::ng-deep {
@import '../../../../../../node_modules/katex/dist/katex';
}where node_modules/katex/dist/katex contains selectors and @font-face definitions. Selectors are correctly parsed, font-faces nope and this breaks equations correct rendering (expected katex fonts are not loaded).
Similarly we use this approach for some other libs with same purpose - to scope global styles inside component
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: CSS encapsulationstate: has PR
