Skip to content

Commit 7347cdd

Browse files
barvianadamwathan
andauthored
[v4] Switch default breakpoints to rem (#13469)
* Switch breakpoints to rem #8378 * Fix broken test * Update snapshots --------- Co-authored-by: Adam Wathan <[email protected]>
1 parent ce0a734 commit 7347cdd

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
1111
--default-mono-font-family: var(--font-family-mono);
1212
--default-mono-font-feature-settings: var(--font-family-mono--font-feature-settings);
1313
--default-mono-font-variation-settings: var(--font-family-mono--font-variation-settings);
14-
--breakpoint-sm: 640px;
15-
--breakpoint-md: 768px;
16-
--breakpoint-lg: 1024px;
17-
--breakpoint-xl: 1280px;
18-
--breakpoint-2xl: 1536px;
14+
--breakpoint-sm: 40rem;
15+
--breakpoint-md: 48rem;
16+
--breakpoint-lg: 64rem;
17+
--breakpoint-xl: 80rem;
18+
--breakpoint-2xl: 96rem;
1919
--color-black: #000;
2020
--color-white: #fff;
2121
--color-slate-50: #f8fafc;
@@ -599,7 +599,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
599599
text-decoration-line: underline;
600600
}
601601
602-
@media (width >= 1536px) {
602+
@media (width >= 96rem) {
603603
.\\32 xl\\:font-bold {
604604
font-weight: 700;
605605
}

packages/tailwindcss/src/__snapshots__/index.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
1010
--default-mono-font-family: var(--font-family-mono);
1111
--default-mono-font-feature-settings: var(--font-family-mono--font-feature-settings);
1212
--default-mono-font-variation-settings: var(--font-family-mono--font-variation-settings);
13-
--breakpoint-sm: 640px;
14-
--breakpoint-md: 768px;
15-
--breakpoint-lg: 1024px;
16-
--breakpoint-xl: 1280px;
17-
--breakpoint-2xl: 1536px;
13+
--breakpoint-sm: 40rem;
14+
--breakpoint-md: 48rem;
15+
--breakpoint-lg: 64rem;
16+
--breakpoint-xl: 80rem;
17+
--breakpoint-2xl: 96rem;
1818
--color-black: #000;
1919
--color-white: #fff;
2020
--color-slate-50: #f8fafc;
@@ -417,7 +417,7 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
417417
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
418418
}
419419
420-
@media (width >= 640px) {
420+
@media (width >= 40rem) {
421421
.sm\\:flex {
422422
display: flex;
423423
}

packages/tailwindcss/theme.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
--default-mono-font-variation-settings: var(--font-family-mono--font-variation-settings);
1111

1212
/* Breakpoints */
13-
--breakpoint-sm: 640px;
14-
--breakpoint-md: 768px;
15-
--breakpoint-lg: 1024px;
16-
--breakpoint-xl: 1280px;
17-
--breakpoint-2xl: 1536px;
13+
--breakpoint-sm: 40rem;
14+
--breakpoint-md: 48rem;
15+
--breakpoint-lg: 64rem;
16+
--breakpoint-xl: 80rem;
17+
--breakpoint-2xl: 96rem;
1818

1919
/* Colors */
2020
--color-black: #000;

0 commit comments

Comments
 (0)