Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasBoll committed May 16, 2024
1 parent d96ae2d commit ac15c51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions modules/styling/lib/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,12 @@ export function createStencil<
composesReturn?.className,
_base,
modifierClasses,
// For compat mode, we need to add inert class names of modifiers where the `css-` prefix is
// removed. For example, `css-base css-mod-1` will become `css-base css-mod-1 mod-1`. The
// modifier class without the prefix will be ignored by the Emotion CSS `cx` function and
// will remain for the `parentModifier` function to still select on. We decided to add these
// inert class names instead of adding `data-m-*` attributes because the output DOM looks
// much cleaner and it saves bytes on the bundled output.
modifierClasses
.split(' ')
.map(c => c.replace('css-', ''))
Expand Down
3 changes: 0 additions & 3 deletions modules/styling/spec/cs.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,6 @@ describe('cs', () => {
width: '0',
},
},
foo: {
true: {},
},
},
});

Expand Down

0 comments on commit ac15c51

Please sign in to comment.