Skip to content

Commit d44e75f

Browse files
authored
Purge layers by default, deprecate conservative mode (#2288)
* Purge `layers` by default, deprecate `conservative` mode * Ensure base styles are wrapped in @layer * Update processPlugins test
1 parent ae6c1d0 commit d44e75f

File tree

5 files changed

+639
-333
lines changed

5 files changed

+639
-333
lines changed

__tests__/processPlugins.test.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,13 @@ test('plugins can add base styles with object syntax', () => {
288288
)
289289

290290
expect(css(base)).toMatchCss(`
291-
img {
292-
max-width: 100%
293-
}
294-
button {
295-
font-family: inherit
291+
@layer base {
292+
img {
293+
max-width: 100%
294+
}
295+
button {
296+
font-family: inherit
297+
}
296298
}
297299
`)
298300
})
@@ -321,11 +323,13 @@ test('plugins can add base styles with raw PostCSS nodes', () => {
321323
)
322324

323325
expect(css(base)).toMatchCss(`
324-
img {
325-
max-width: 100%
326-
}
327-
button {
328-
font-family: inherit
326+
@layer base {
327+
img {
328+
max-width: 100%
329+
}
330+
button {
331+
font-family: inherit
332+
}
329333
}
330334
`)
331335
})

0 commit comments

Comments
 (0)