Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Use initial for @property fallbacks instead of
  • Loading branch information
adamwathan committed Jul 4, 2024
commit c8ea3f3882e469f0bd2e7b84c7bf9030eb5534a1
5 changes: 4 additions & 1 deletion packages/tailwindcss/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

/* Test against mobile viewports. */
// {
Expand Down
6 changes: 3 additions & 3 deletions packages/tailwindcss/src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
--tw-shadow-colored: 0 0 #0000;
--tw-inset-shadow: 0 0 #0000;
--tw-inset-shadow-colored: 0 0 #0000;
--tw-ring-color: ;
--tw-ring-color: initial;
--tw-ring-shadow: 0 0 #0000;
--tw-inset-ring-color: ;
--tw-inset-ring-color: initial;
--tw-inset-ring-shadow: 0 0 #0000;
--tw-ring-inset: ;
--tw-ring-inset: initial;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-shadow: 0 0 #0000;
Expand Down
4 changes: 2 additions & 2 deletions packages/tailwindcss/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ export function toCss(ast: AstNode[]) {
}

if (inherits) {
propertyFallbacksRoot.push(decl(property, initialValue ?? ' '))
propertyFallbacksRoot.push(decl(property, initialValue ?? 'initial'))
} else {
propertyFallbacksUniversal.push(decl(property, initialValue ?? ' '))
propertyFallbacksUniversal.push(decl(property, initialValue ?? 'initial'))
}

seenAtProperties.add(node.selector)
Expand Down
102 changes: 51 additions & 51 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3824,9 +3824,9 @@ test('touch-pan', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-pan-x: initial;
--tw-pan-y: initial;
--tw-pinch-zoom: initial;
}
}
}
Expand Down Expand Up @@ -3868,9 +3868,9 @@ test('touch-pinch-zoom', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-pan-x: initial;
--tw-pan-y: initial;
--tw-pinch-zoom: initial;
}
}
}
Expand Down Expand Up @@ -8239,8 +8239,8 @@ test('from', () => {
--tw-gradient-from: #0000;
--tw-gradient-to: #0000;
--tw-gradient-via: transparent;
--tw-gradient-stops: ;
--tw-gradient-via-stops: ;
--tw-gradient-stops: initial;
--tw-gradient-via-stops: initial;
--tw-gradient-from-position: 0%;
--tw-gradient-via-position: 50%;
--tw-gradient-to-position: 100%;
Expand Down Expand Up @@ -8476,8 +8476,8 @@ test('via', () => {
--tw-gradient-from: #0000;
--tw-gradient-to: #0000;
--tw-gradient-via: transparent;
--tw-gradient-stops: ;
--tw-gradient-via-stops: ;
--tw-gradient-stops: initial;
--tw-gradient-via-stops: initial;
--tw-gradient-from-position: 0%;
--tw-gradient-via-position: 50%;
--tw-gradient-to-position: 100%;
Expand Down Expand Up @@ -8701,8 +8701,8 @@ test('to', () => {
--tw-gradient-from: #0000;
--tw-gradient-to: #0000;
--tw-gradient-via: transparent;
--tw-gradient-stops: ;
--tw-gradient-via-stops: ;
--tw-gradient-stops: initial;
--tw-gradient-via-stops: initial;
--tw-gradient-from-position: 0%;
--tw-gradient-via-position: 50%;
--tw-gradient-to-position: 100%;
Expand Down Expand Up @@ -10477,15 +10477,15 @@ test('filter', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-opacity: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-blur: initial;
--tw-brightness: initial;
--tw-contrast: initial;
--tw-grayscale: initial;
--tw-hue-rotate: initial;
--tw-invert: initial;
--tw-opacity: initial;
--tw-saturate: initial;
--tw-sepia: initial;
}
}
}
Expand Down Expand Up @@ -10787,15 +10787,15 @@ test('backdrop-filter', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-backdrop-blur: initial;
--tw-backdrop-brightness: initial;
--tw-backdrop-contrast: initial;
--tw-backdrop-grayscale: initial;
--tw-backdrop-hue-rotate: initial;
--tw-backdrop-invert: initial;
--tw-backdrop-opacity: initial;
--tw-backdrop-saturate: initial;
--tw-backdrop-sepia: initial;
}
}
}
Expand Down Expand Up @@ -11157,10 +11157,10 @@ test('contain', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
--tw-contain-size: initial;
--tw-contain-layout: initial;
--tw-contain-paint: initial;
--tw-contain-style: initial;
}
}
}
Expand Down Expand Up @@ -11378,11 +11378,11 @@ test('font-variant-numeric', () => {
@supports (-moz-orient: inline) {
@layer base {
*, :before, :after, ::backdrop {
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ordinal: initial;
--tw-slashed-zero: initial;
--tw-numeric-figure: initial;
--tw-numeric-spacing: initial;
--tw-numeric-fraction: initial;
}
}
}
Expand Down Expand Up @@ -12104,11 +12104,11 @@ test('shadow', () => {
--tw-shadow-colored: 0 0 #0000;
--tw-inset-shadow: 0 0 #0000;
--tw-inset-shadow-colored: 0 0 #0000;
--tw-ring-color: ;
--tw-ring-color: initial;
--tw-ring-shadow: 0 0 #0000;
--tw-inset-ring-color: ;
--tw-inset-ring-color: initial;
--tw-inset-ring-shadow: 0 0 #0000;
--tw-ring-inset: ;
--tw-ring-inset: initial;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-shadow: 0 0 #0000;
Expand Down Expand Up @@ -12356,11 +12356,11 @@ test('inset-shadow', () => {
--tw-shadow-colored: 0 0 #0000;
--tw-inset-shadow: 0 0 #0000;
--tw-inset-shadow-colored: 0 0 #0000;
--tw-ring-color: ;
--tw-ring-color: initial;
--tw-ring-shadow: 0 0 #0000;
--tw-inset-ring-color: ;
--tw-inset-ring-color: initial;
--tw-inset-ring-shadow: 0 0 #0000;
--tw-ring-inset: ;
--tw-ring-inset: initial;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-shadow: 0 0 #0000;
Expand Down Expand Up @@ -12604,11 +12604,11 @@ test('ring', () => {
--tw-shadow-colored: 0 0 #0000;
--tw-inset-shadow: 0 0 #0000;
--tw-inset-shadow-colored: 0 0 #0000;
--tw-ring-color: ;
--tw-ring-color: initial;
--tw-ring-shadow: 0 0 #0000;
--tw-inset-ring-color: ;
--tw-inset-ring-color: initial;
--tw-inset-ring-shadow: 0 0 #0000;
--tw-ring-inset: ;
--tw-ring-inset: initial;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-shadow: 0 0 #0000;
Expand Down Expand Up @@ -12853,11 +12853,11 @@ test('inset-ring', () => {
--tw-shadow-colored: 0 0 #0000;
--tw-inset-shadow: 0 0 #0000;
--tw-inset-shadow-colored: 0 0 #0000;
--tw-ring-color: ;
--tw-ring-color: initial;
--tw-ring-shadow: 0 0 #0000;
--tw-inset-ring-color: ;
--tw-inset-ring-color: initial;
--tw-inset-ring-shadow: 0 0 #0000;
--tw-ring-inset: ;
--tw-ring-inset: initial;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-shadow: 0 0 #0000;
Expand Down