Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop prefixer #3296

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/late-horses-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@emotion/styled': major
'@emotion/cache': major
'@emotion/react': major
'@emotion/css': major
---

Removed auto-prefixing from the defaults. It can still be used by creating a custom cache with a `prefixer` plugin from `stylis`.
7 changes: 2 additions & 5 deletions packages/cache/__tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

exports[`should accept container option 1`] = `
.emotion-0 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
color: blue;
}
Expand All @@ -22,7 +19,7 @@ exports[`should accept container option 1`] = `
data-s=""
>

.emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:blue;}
.emotion-0{display:flex;color:blue;}
</style>
</div>
<div>
Expand All @@ -45,7 +42,7 @@ exports[`should accept insertionPoint option 1`] = `
data-s=""
>

.test-insertion-point-83n355{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:blue;}
.test-insertion-point-83n355{display:flex;color:blue;}
</style>


Expand Down
4 changes: 2 additions & 2 deletions packages/cache/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
createUnsafeSelectorsAlarm,
incorrectImportAlarm
} from './stylis-plugins'
import { prefixer } from './prefixer'
import { StylisPlugin } from './types'

export interface Options {
Expand All @@ -37,7 +36,8 @@ let getServerStylisCache = isBrowser
? undefined
: weakMemoize(() => memoize<Record<string, string>>(() => ({})))

const defaultStylisPlugins = [prefixer]
// keep it in a variable as it's used as cache key by `getServerStylisCache`
const defaultStylisPlugins: StylisPlugin[] = []

let getSourceMap: ((styles: string) => string | undefined) | undefined
if (isDevelopment) {
Expand Down
Loading
Loading