admin管理员组文章数量:1122832
In a CSS file, I have two simple view-transition styling rules.
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
::view-transition-old(root) {
animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
::view-transition-new(root) {
animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}
I have to add those comments to disable lint errors, but when building for production, I get the following warning:
2 rules skipped due to selector errors:
::view-transition-old(root) -> Pseudo-elements are not supported by css-select
::view-transition-new(root) -> Pseudo-elements are not supported by css-select
I am using Angular 19; everything is updated to the latest version. In my app config I have
enabled viewTransitions for router with provideRouter(routes, withViewTransitions())
I am using plain CSS. I guess css-select is something internal to Angular build system, but is there a way to solve this?
In a CSS file, I have two simple view-transition styling rules.
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
::view-transition-old(root) {
animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
::view-transition-new(root) {
animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}
I have to add those comments to disable lint errors, but when building for production, I get the following warning:
2 rules skipped due to selector errors:
::view-transition-old(root) -> Pseudo-elements are not supported by css-select
::view-transition-new(root) -> Pseudo-elements are not supported by css-select
I am using Angular 19; everything is updated to the latest version. In my app config I have
enabled viewTransitions for router with provideRouter(routes, withViewTransitions())
I am using plain CSS. I guess css-select is something internal to Angular build system, but is there a way to solve this?
Share Improve this question asked Nov 22, 2024 at 23:07 Kostas OreopoulosKostas Oreopoulos 931 silver badge10 bronze badges1 Answer
Reset to default 0This is a critters/beatties issue, the library that is used for critical inlining.
It means those rules aren't inlined.
The only way to disable that warning today is by desabiling critical inlining with inlineCritical: false
:
"project": {
"architect": {
"build": {
"configurations": {
"production": {
"optimization": {
"scripts": true,
"styles": {
"inlineCritical": false
},
"fonts": true
}
}
}
}
}
},
本文标签: cssAngular build warning with view transition pseudo elementsStack Overflow
版权声明:本文标题:css - Angular build warning with view transition pseudo elements - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300409a1930804.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论