question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng build cause warnings with pseudo-selectors in :is/:where

See original GitHub issue
`ng build` inlines critical css but causes warnings when using pseudo selectors inside a :is or :where.

image

This is not a breaking bug. Usually this only involves states of elements, which is not necessary for critical css. However, it might exclude a state that is relevant. Maybe you consider this out of scope?

🔬 Minimal Reproduction

https://github.com/kyubisation/ng-pseudo-selector-inlining

Place the following in styles.css:

.example:is(:hover, .active) {
  color: green;
}

🔥 Exception or Error


⠋ Generating index html...1 rules skipped due to selector errors:
  :where(.example):is(,.active) -> Empty sub-selector

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
ShiJuuRokucommented, Mar 31, 2022

+ combinator seem to produce same warning router-outlet + *

1reaction
developitcommented, Jul 13, 2022

@hiepxanh best thing to do would be to check for an update in the css-select npm module, which is what Critters uses to parse selectors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: ng build cause warnings with pseudo-selectors in :is ...
`ng build` inlines critical css but causes warnings when using pseudo selectors inside a :is or :where. image. This is not a breaking...
Read more >
Angular 12 production build warning (MDB4 12)
After said upgrade, the production build command (ng build --configuration production) show these warnings: √ Browser application bundle generation ...
Read more >
Angular 5 Warning in Invalid selector - css - Stack Overflow
So when I deploy by ng s --prod, angular omits space1x in style.css bundle. Therefore, the correct instruction should be like this:
Read more >
Template type checking - Angular
Infers the correct type of $event in component/directive, DOM, and animation event bindings; Infers the correct type of local references to DOM elements,...
Read more >
Angular :host, :host-context, ::ng-deep - The Complete Guide
The ::ng-deep pseudo-class selector also has a couple of aliases: >>> and /deep/ , and all three are soon to be removed. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found