Skip to content

Commit

Permalink
fix tests and property value id generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Zn4rK committed Jan 16, 2024
1 parent 38702de commit e8f0668
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class PropertyValueIDGenerator implements IdentifierGenerator<StyleBlock>
}> = {};

next({ property, media = '', support = '', container = '', pseudo = '', value }: StyleBlock) {
const propertyKey = `${media}${support}${container}${pseudo}${property}`;
const propertyKey = `m${media}s${support}c${container}ps${pseudo}p${property}`;

if (this.cache[propertyKey] === undefined) {
this.cache[propertyKey] = {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/tests/src/printers/printStyleBlock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe('printStyleBlock', () => {
const result = printStyleBlocks(blocks);

expect(result).toMatchInlineSnapshot(
`"@media (min-width: 100px){.a1{background:green}@container (min-width: 100px){.c1{color:green}@supports (display: grid){.b1{color:green}}}.a1{background:green}}"`,
`"@media (min-width: 100px){@container (min-width: 100px){.d1{color:green}@supports (display: grid){.b1{color:green}}}.a1{background:green}}@container (min-width: 100px){.c1{background:green}}"`,
);
});
});

0 comments on commit e8f0668

Please sign in to comment.