Skip to content

Commit

Permalink
operator-no-unspaced: ignore operators inside @scope (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristerkari committed May 3, 2024
1 parent 87d5a08 commit aff035f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/rules/operator-no-unspaced/__tests__/index.js
Expand Up @@ -1359,6 +1359,17 @@ testRule({
}
`,
description: "issue #709"
},
{
code: `
@scope([class*="my-selector-"]) {
:scope {
// Override the default theme variables
--d-font-size-base: 14;
}
}
`,
description: "issue #989"
}
],

Expand Down
5 changes: 3 additions & 2 deletions src/rules/operator-no-unspaced/index.js
Expand Up @@ -196,11 +196,12 @@ function calculationOperatorSpaceChecker({ root, result, checker }) {
}

if (item.type === "atrule") {
// @forward, @use and @at-root
// @forward, @use, @at-root, and @scope
if (
item.name === "forward" ||
item.name === "use" ||
item.name === "at-root"
item.name === "at-root" ||
item.name === "scope"
) {
return;
}
Expand Down

0 comments on commit aff035f

Please sign in to comment.