Skip to content

Commit

Permalink
Improve CSS variable rule check in RuntimeCSS class
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Dec 12, 2024
1 parent 7b12271 commit d382579
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/runtime/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ export class RuntimeCSS extends MasterCSS {
const selectorText = (eachCSSRule as CSSStyleRule).selectorText
if ((eachCSSRule as CSSStyleRule).style.length) {
let isVariablesRule = true
for (const style of (eachCSSRule as CSSStyleRule).style) {
if (!style.startsWith('--')) {
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < (eachCSSRule as CSSStyleRule).style.length; i++) {
if (!(eachCSSRule as CSSStyleRule).style[i]?.startsWith('--')) {
isVariablesRule = false
break
}
Expand Down

0 comments on commit d382579

Please sign in to comment.