From 5139be6ee42a0ca97648a4a6338b748fe62f67ea Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 11 Jul 2025 09:24:12 -0400 Subject: [PATCH 1/8] Center the ::marker added to an input with a paired datalist This only affects chrome and also does not appear to cause issues for date/time inputs. While weird that this pseudo is the one used for a datalist marker it is indeed correct. --- packages/tailwindcss/preflight.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index 0976a40d4924..319c826fc4e3 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -349,6 +349,14 @@ textarea { padding-block: 0; } +/* + Center dropdown marker shown on inputs with paired ``s in Chrome +*/ + +::-webkit-calendar-picker-indicator { + line-height: 1; +} + /* Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) */ From 4193d0dae145843ccb2c3b2247b2d7af87a63416 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 11 Jul 2025 09:25:50 -0400 Subject: [PATCH 2/8] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cf1ede902bd..3731abee5bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Track source locations through `@plugin` and `@config` ([#18345](https://github.com/tailwindlabs/tailwindcss/pull/18345)) - Handle when `process.env.DEBUG` is a boolean in `@tailwindcss/node` ([#18485](https://github.com/tailwindlabs/tailwindcss/pull/18485)) - Ignore consecutive semicolons in the CSS parser ([#18532](https://github.com/tailwindlabs/tailwindcss/pull/18532)) +- Center the `::marker` added to an input with a paired datalist ([#18511](https://github.com/tailwindlabs/tailwindcss/pull/18511)) ## [4.1.11] - 2025-06-26 From 98755d0e25f1f8c45f0919dce0712db3db5c7db2 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 11 Jul 2025 09:26:41 -0400 Subject: [PATCH 3/8] Update tests --- .../src/__snapshots__/index.test.ts.snap | 4 ++++ .../src/__snapshots__/index.test.ts.snap | 4 ++++ .../src/source-maps/source-map.test.ts | 24 ++++++++++--------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap index c8178f7df6f0..8fdc0dbf740f 100644 --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -240,6 +240,10 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` padding-block: 0; } + ::-webkit-calendar-picker-indicator { + line-height: 1; + } + :-moz-ui-invalid { box-shadow: none; } diff --git a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap index e8159b0f606e..70060e1e1797 100644 --- a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap @@ -354,6 +354,10 @@ exports[`compiling CSS > prefix all CSS variables inside preflight 1`] = ` padding-block: 0; } + ::-webkit-calendar-picker-indicator { + line-height: 1; + } + :-moz-ui-invalid { box-shadow: none; } diff --git a/packages/tailwindcss/src/source-maps/source-map.test.ts b/packages/tailwindcss/src/source-maps/source-map.test.ts index e97956735aad..8fd0697c5807 100644 --- a/packages/tailwindcss/src/source-maps/source-map.test.ts +++ b/packages/tailwindcss/src/source-maps/source-map.test.ts @@ -279,17 +279,19 @@ test('source maps trace back to @import location', async ({ expect }) => { 'preflight.css: 139:4-14 <- 337:2-12', 'preflight.css: 141:2-329 <- 340:0-348:39', 'preflight.css: 142:4-20 <- 349:2-18', - 'preflight.css: 144:2-19 <- 356:0-17', - 'preflight.css: 145:4-20 <- 357:2-18', - 'preflight.css: 147:2-96 <- 364:0-366:23', - 'preflight.css: 148:4-22 <- 367:2-20', - 'preflight.css: 150:2-59 <- 374:0-375:28', - 'preflight.css: 151:4-16 <- 376:2-14', - 'preflight.css: 153:2-47 <- 383:0-45', - 'preflight.css: 154:4-28 <- 384:2-26', - 'index.css: 157:0-16 <- 5:0-42', - 'input.css: 158:0-5 <- 3:0-5', - 'input.css: 159:2-33 <- 4:9-18', + 'preflight.css: 144:2-38 <- 356:0-36', + 'preflight.css: 145:4-18 <- 357:2-16', + 'preflight.css: 147:2-19 <- 364:0-17', + 'preflight.css: 148:4-20 <- 365:2-18', + 'preflight.css: 150:2-96 <- 372:0-374:23', + 'preflight.css: 151:4-22 <- 375:2-20', + 'preflight.css: 153:2-59 <- 382:0-383:28', + 'preflight.css: 154:4-16 <- 384:2-14', + 'preflight.css: 156:2-47 <- 391:0-45', + 'preflight.css: 157:4-28 <- 392:2-26', + 'index.css: 160:0-16 <- 5:0-42', + 'input.css: 161:0-5 <- 3:0-5', + 'input.css: 162:2-33 <- 4:9-18', ]) }) From 8d702e86fd85c5a5ed064c704ec8b1ab99ae1570 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 11 Jul 2025 09:33:24 -0400 Subject: [PATCH 4/8] Update test --- integrations/cli/index.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integrations/cli/index.test.ts b/integrations/cli/index.test.ts index b73c0cfd2ca2..be48a2ac4898 100644 --- a/integrations/cli/index.test.ts +++ b/integrations/cli/index.test.ts @@ -1924,6 +1924,9 @@ test( ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { padding-block: 0; } + ::-webkit-calendar-picker-indicator { + line-height: 1; + } :-moz-ui-invalid { box-shadow: none; } From b37e12dfe367db6126ed1cf434595163738c46c9 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 14 Jul 2025 16:25:51 -0400 Subject: [PATCH 5/8] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3731abee5bd8..df7bd474bc28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Track source locations through `@plugin` and `@config` ([#18345](https://github.com/tailwindlabs/tailwindcss/pull/18345)) - Handle when `process.env.DEBUG` is a boolean in `@tailwindcss/node` ([#18485](https://github.com/tailwindlabs/tailwindcss/pull/18485)) - Ignore consecutive semicolons in the CSS parser ([#18532](https://github.com/tailwindlabs/tailwindcss/pull/18532)) -- Center the `::marker` added to an input with a paired datalist ([#18511](https://github.com/tailwindlabs/tailwindcss/pull/18511)) +- Center the dropdown icon added to an input with a paired datalist ([#18511](https://github.com/tailwindlabs/tailwindcss/pull/18511)) ## [4.1.11] - 2025-06-26 From 214ee4ad237a3c30888a54cae8c8d68064286abe Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 15 Jul 2025 13:03:01 -0400 Subject: [PATCH 6/8] Apply suggestion from @reinink Co-authored-by: Jonathan Reinink --- packages/tailwindcss/preflight.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index 319c826fc4e3..753e79ef0d0f 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -350,7 +350,7 @@ textarea { } /* - Center dropdown marker shown on inputs with paired ``s in Chrome + Center dropdown marker shown on inputs with paired ``s in Chrome. (https://github.com/tailwindlabs/tailwindcss/issues/18499) */ ::-webkit-calendar-picker-indicator { From 9664c7156d0eee7d04d0399b319e5fc62288df9c Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 15 Jul 2025 14:26:37 -0400 Subject: [PATCH 7/8] fix vite test failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit there’s a bug in nitro --- integrations/vite/nuxt.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/vite/nuxt.test.ts b/integrations/vite/nuxt.test.ts index ab14628c7da5..381cace4629e 100644 --- a/integrations/vite/nuxt.test.ts +++ b/integrations/vite/nuxt.test.ts @@ -8,6 +8,7 @@ const SETUP = { "dependencies": { "@tailwindcss/vite": "workspace:^", "nuxt": "^3.13.1", + "nitropack": "2.11.0", "tailwindcss": "workspace:^", "vue": "latest" } From 6564c92fad3616e53f140d9c67cfc425621936bb Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 15 Jul 2025 14:34:44 -0400 Subject: [PATCH 8/8] wip --- integrations/vite/nuxt.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/vite/nuxt.test.ts b/integrations/vite/nuxt.test.ts index 381cace4629e..084e319d7615 100644 --- a/integrations/vite/nuxt.test.ts +++ b/integrations/vite/nuxt.test.ts @@ -7,7 +7,7 @@ const SETUP = { "type": "module", "dependencies": { "@tailwindcss/vite": "workspace:^", - "nuxt": "^3.13.1", + "nuxt": "3.14.0", "nitropack": "2.11.0", "tailwindcss": "workspace:^", "vue": "latest"