Skip to content

Commit

Permalink
visitor.js: warning should not be given if it's not about CSS Propert…
Browse files Browse the repository at this point in the history
…y Set
  • Loading branch information
Gnito committed Sep 4, 2024
1 parent 7acd49b commit cde1b74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-scripts/postcss/postcss-apply/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ class Visitor {
}

const setName = matches[2];
const { parent } = decl;
const { parent, value } = decl;

if (parent.selector !== ':root') {
if (value?.indexOf('{') === 0 && parent.selector !== ':root') {
decl.warn(
this.result,
'Custom property set ignored: not scoped to top-level `:root` ' +
Expand Down

0 comments on commit cde1b74

Please sign in to comment.