Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove @warp-ds/css dep to fix circular dependency (#149)
Co-authored-by: AnnaRybkina <37986637+AnnaRybkina@users.noreply.github.com>
- Loading branch information
1 parent
51a7f4c
commit e351c76
Showing
7 changed files
with
50 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`external classes > externalized class of mt-32 should be excluded from the css 1`] = ` | ||
"/* layer: default */ | ||
.mb-24{margin-bottom:2.4rem;} | ||
.mt-16{margin-top:1.6rem;}" | ||
`; | ||
|
||
exports[`external classes > externalized class of mt-32 should be included if used with modifier 1`] = ` | ||
"/* layer: default */ | ||
.active\\\\:mt-32:active{margin-top:3.2rem;} | ||
@media (min-width: 480px){ | ||
.sm\\\\:mt-32{margin-top:3.2rem;} | ||
} | ||
@media (min-width: 768px){ | ||
.md\\\\:mt-32{margin-top:3.2rem;} | ||
}" | ||
`; | ||
|
||
exports[`external classes > externalized classes of mt-32 and mb-32 should be excluded from the css 1`] = ` | ||
"/* layer: default */ | ||
.mt-16{margin-top:1.6rem;}" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { setup } from './_helpers.js'; | ||
import { describe, expect, test } from 'vitest'; | ||
|
||
setup({ externalizeClasses: true, externalClasses: ["mt-32", "mb-32"] }); | ||
|
||
describe('external classes', () => { | ||
test('externalized classes of mt-32 and mb-32 should be excluded from the css', async ({ uno }) => { | ||
const classes = ['mt-16', 'mt-32', 'mb-32']; | ||
const { css } = await uno.generate(classes); | ||
expect(css).toMatchSnapshot(); | ||
}); | ||
test('externalized class of mt-32 should be excluded from the css', async ({ uno }) => { | ||
const classes = ['mt-16', 'mt-32', 'mb-24']; | ||
const { css } = await uno.generate(classes); | ||
expect(css).toMatchSnapshot(); | ||
}); | ||
test('externalized class of mt-32 should be included if used with modifier', async ({ uno }) => { | ||
const classes = ['sm:mt-32', 'md:mt-32', 'active:mt-32']; | ||
const { css } = await uno.generate(classes); | ||
expect(css).toMatchSnapshot(); | ||
}); | ||
}); |