From cd393f5b4811d0f98c4acd57aeb6be853c1986aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouleau?= Date: Sun, 9 Jun 2024 18:16:22 -0400 Subject: [PATCH 1/4] Prevent Preflight from affecting list semantics --- packages/tailwindcss/preflight.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index 8138927d8654..3d658d7f6bc1 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -262,13 +262,13 @@ summary { } /* - Make lists unstyled by default. + Make lists unstyled by default, without affecting semantics. (https://www.matuzo.at/blog/2023/removing-list-styles-without-affecting-semantics) */ ol, ul, menu { - list-style: none; + list-style-type: ''; } /* From dae2ae23faf5751d36837c33bb2cf1c7c99f7ac1 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 14 Jun 2024 15:41:46 -0400 Subject: [PATCH 2/4] Use `list-style` property --- 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 3d658d7f6bc1..7aa6bba93d3e 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -268,7 +268,7 @@ summary { ol, ul, menu { - list-style-type: ''; + list-style: ''; } /* From e1432522a3c2b350cb1b78e572887625dcbce560 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 14 Jun 2024 15:42:12 -0400 Subject: [PATCH 3/4] Update snapshots --- .../@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap index e8848e86c902..90c0eaf21938 100644 --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -552,7 +552,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` } ol, ul, menu { - list-style: none; + list-style: ""; } textarea { From e1bf884c1148be8ff12fcbf2604adf9fc62b15bf Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 14 Jun 2024 15:46:46 -0400 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4064b651408e..6d009df35983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `rounded-4xl` utility ([#13827](https://github.com/tailwindlabs/tailwindcss/pull/13827)) - Add `backdrop-blur-none` and `blur-none` utilities ([#13831](https://github.com/tailwindlabs/tailwindcss/pull/13831)) - Include variable in output for bare utilities like `rounded` ([#13836](https://github.com/tailwindlabs/tailwindcss/pull/13836)) +- Preserve list semantics for `ul`, `li`, and `menu` by default ([#13815](https://github.com/tailwindlabs/tailwindcss/pull/13815)) ## [4.0.0-alpha.16] - 2024-06-07