Skip to content

Commit 0289aa3

Browse files
committed
update tests to reflect changes
1 parent 7914ec0 commit 0289aa3

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
44
"@layer theme {
55
:root, :host {
6+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
7+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
68
--color-black: #000;
79
--text-2xl: 1.5rem;
810
--text-2xl--line-height: calc(2 / 1.5);
911
--font-weight-bold: 700;
10-
--default-transition-duration: .15s;
11-
--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
1212
--default-font-family: var(--font-sans);
1313
--default-font-feature-settings: var(--font-sans--font-feature-settings);
1414
--default-font-variation-settings: var(--font-sans--font-variation-settings);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using the default theme 1`] = `
44
":root, :host {
5+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
6+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
57
--color-red-500: oklch(.637 .237 25.331);
68
--spacing: .25rem;
7-
--default-transition-duration: .15s;
8-
--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
99
}
1010
1111
.w-4 {

packages/tailwindcss/src/css-functions.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ describe('--spacing(…)', () => {
7272
}
7373
`),
7474
).toMatchInlineSnapshot(`
75-
".foo {
75+
":root, :host {
76+
--spacing: .25rem;
77+
}
78+
79+
.foo {
7680
margin: calc(var(--spacing) * 4);
7781
}"
7882
`)

packages/tailwindcss/src/index.test.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ describe('compiling CSS', () => {
169169
),
170170
).toMatchInlineSnapshot(`
171171
":root, :host {
172-
--spacing-1\\.5: 1.5px;
173172
--spacing-2_5: 2.5px;
174-
--spacing-3\\.5: 3.5px;
175-
--spacing-foo\\/bar: 3rem;
176173
}
177174
178175
.m-1\\.5 {
@@ -286,7 +283,16 @@ describe('@apply', () => {
286283
}
287284
`),
288285
).toMatchInlineSnapshot(`
289-
".foo {
286+
":root, :host {
287+
--color-red-200: #fecaca;
288+
--color-red-500: #ef4444;
289+
--color-blue-500: #3b82f6;
290+
--color-green-200: #bbf7d0;
291+
--color-green-500: #22c55e;
292+
--animate-spin: spin 1s linear infinite;
293+
}
294+
295+
.foo {
290296
--tw-translate-x: 100%;
291297
translate: var(--tw-translate-x) var(--tw-translate-y);
292298
animation: var(--animate-spin);
@@ -316,6 +322,12 @@ describe('@apply', () => {
316322
}
317323
}
318324
325+
@keyframes spin {
326+
to {
327+
transform: rotate(360deg);
328+
}
329+
}
330+
319331
@property --tw-translate-x {
320332
syntax: "*";
321333
inherits: false;
@@ -1094,12 +1106,7 @@ describe('Parsing themes values from CSS', () => {
10941106
['w-1/2', 'w-75%'],
10951107
),
10961108
).toMatchInlineSnapshot(`
1097-
":root, :host {
1098-
--width-1\\/2: 75%;
1099-
--width-75\\%: 50%;
1100-
}
1101-
1102-
.w-1\\/2 {
1109+
".w-1\\/2 {
11031110
width: var(--width-1\\/2);
11041111
}
11051112

packages/tailwindcss/src/utilities.test.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4036,11 +4036,7 @@ test('translate-x', async () => {
40364036
['translate-x-full', '-translate-x-full', 'translate-x-px', '-translate-x-[var(--value)]'],
40374037
),
40384038
).toMatchInlineSnapshot(`
4039-
":root, :host {
4040-
--spacing: .25rem;
4041-
}
4042-
4043-
.-translate-x-\\[var\\(--value\\)\\] {
4039+
".-translate-x-\\[var\\(--value\\)\\] {
40444040
--tw-translate-x: calc(var(--value) * -1);
40454041
translate: var(--tw-translate-x) var(--tw-translate-y);
40464042
}
@@ -4164,11 +4160,7 @@ test('translate-y', async () => {
41644160
['translate-y-full', '-translate-y-full', 'translate-y-px', '-translate-y-[var(--value)]'],
41654161
),
41664162
).toMatchInlineSnapshot(`
4167-
":root, :host {
4168-
--spacing: .25rem;
4169-
}
4170-
4171-
.-translate-y-\\[var\\(--value\\)\\] {
4163+
".-translate-y-\\[var\\(--value\\)\\] {
41724164
--tw-translate-y: calc(var(--value) * -1);
41734165
translate: var(--tw-translate-x) var(--tw-translate-y);
41744166
}

0 commit comments

Comments
 (0)