Skip to content

Commit

Permalink
Purge layers by default, deprecate conservative mode (#2288)
Browse files Browse the repository at this point in the history
* Purge `layers` by default, deprecate `conservative` mode

* Ensure base styles are wrapped in @layer

* Update processPlugins test
  • Loading branch information
adamwathan authored Sep 2, 2020
1 parent ae6c1d0 commit d44e75f
Show file tree
Hide file tree
Showing 5 changed files with 639 additions and 333 deletions.
24 changes: 14 additions & 10 deletions __tests__/processPlugins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ test('plugins can add base styles with object syntax', () => {
)

expect(css(base)).toMatchCss(`
img {
max-width: 100%
}
button {
font-family: inherit
@layer base {
img {
max-width: 100%
}
button {
font-family: inherit
}
}
`)
})
Expand Down Expand Up @@ -321,11 +323,13 @@ test('plugins can add base styles with raw PostCSS nodes', () => {
)

expect(css(base)).toMatchCss(`
img {
max-width: 100%
}
button {
font-family: inherit
@layer base {
img {
max-width: 100%
}
button {
font-family: inherit
}
}
`)
})
Expand Down
Loading

0 comments on commit d44e75f

Please sign in to comment.