diff --git a/.changeset/dry-rabbits-grow.md b/.changeset/dry-rabbits-grow.md new file mode 100644 index 000000000..4c0b204fb --- /dev/null +++ b/.changeset/dry-rabbits-grow.md @@ -0,0 +1,5 @@ +--- +'@vanilla-extract/css': patch +--- + +Fix runtime behavior to match the type definition diff --git a/packages/css/src/style.ts b/packages/css/src/style.ts index d2c417a1f..39a4bc2ea 100644 --- a/packages/css/src/style.ts +++ b/packages/css/src/style.ts @@ -28,10 +28,10 @@ function composedStyle(rules: Array, debugId?: string) { const styleRules = []; for (const rule of rules) { - if (typeof rule === 'string') { - classList.push(rule); - } else { + if (typeof rule !== 'string' && !Array.isArray(rule)) { styleRules.push(rule); + } else { + classList.push(rule); } }