Skip to content

Commit

Permalink
fix: Fix issue where the wrong class was created
Browse files Browse the repository at this point in the history
  • Loading branch information
youthfulhps committed Sep 21, 2023
1 parent 4a33378 commit 648c3d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers/converter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function convertStyles(styles: StyleRule[]) {
combinedSelectors +
utilities.reduce(
(combinedUtilities, util) =>
combinedUtilities + selector + util + ' ',
combinedUtilities + `${selector}${selector ? ':' : ''}${util} `,
'',
),
'',
Expand All @@ -30,7 +30,9 @@ export function convertStyles(styles: StyleRule[]) {

export function convertSelector(selectors: string[]) {
return selectors.map((selector) =>
selector === '_' ? '' : `[${selector.replace('_ ', '&>')}]`,
selector === '_'
? ''
: `[${selector.replace('_', '&').replaceAll(' ', '>')}]`,
);
}

Expand Down

0 comments on commit 648c3d2

Please sign in to comment.