File tree 1 file changed +9
-8
lines changed
packages/tailwindcss/src/compat
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -499,17 +499,18 @@ export function objectToAst(rules: CssInJs | CssInJs[]): AstNode[] {
499
499
500
500
for ( let [ name , value ] of entries ) {
501
501
if ( typeof value !== 'object' ) {
502
- if ( ! name . startsWith ( '--' ) && value === '@slot' ) {
503
- ast . push ( rule ( name , [ atRule ( '@slot' ) ] ) )
504
- } else {
505
- if ( ! name . startsWith ( '--' ) ) {
506
- // Convert camelCase to kebab-case:
507
- // https://github.com/postcss/postcss-js/blob/b3db658b932b42f6ac14ca0b1d50f50c4569805b/parser.js#L30-L35
508
- name = name . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( )
502
+ if ( ! name . startsWith ( '--' ) ) {
503
+ if ( value === '@slot' ) {
504
+ ast . push ( rule ( name , [ atRule ( '@slot' ) ] ) )
505
+ continue
509
506
}
510
507
511
- ast . push ( decl ( name , String ( value ) ) )
508
+ // Convert camelCase to kebab-case:
509
+ // https://github.com/postcss/postcss-js/blob/b3db658b932b42f6ac14ca0b1d50f50c4569805b/parser.js#L30-L35
510
+ name = name . replace ( / ( [ A - Z ] ) / g, '-$1' ) . toLowerCase ( )
512
511
}
512
+
513
+ ast . push ( decl ( name , String ( value ) ) )
513
514
} else if ( Array . isArray ( value ) ) {
514
515
for ( let item of value ) {
515
516
if ( typeof item === 'string' ) {
You can’t perform that action at this time.
0 commit comments