From 615961de1f059d215cabfc1c411cc60e6e01ba08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Mon, 24 Nov 2025 15:39:25 -0500 Subject: [PATCH 1/2] Preserve aspect ratio of `svg` elements when changing their width --- packages/tailwindcss/preflight.css | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index 753e79ef0d0f..943c6dbbf635 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -223,6 +223,7 @@ object { */ img, +svg, video { max-width: 100%; height: auto; From b067b9940084dfc5ec3047d71f69c4c895f57122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Mon, 24 Nov 2025 15:53:08 -0500 Subject: [PATCH 2/2] Fix tests? --- .../@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap | 2 +- packages/tailwindcss/src/__snapshots__/index.test.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap index 8fdc0dbf740f..83307213d4e6 100644 --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -128,7 +128,7 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` display: block; } - img, video { + img, svg, video { max-width: 100%; height: auto; } diff --git a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap index 70060e1e1797..e5628859dbcd 100644 --- a/packages/tailwindcss/src/__snapshots__/index.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/index.test.ts.snap @@ -242,7 +242,7 @@ exports[`compiling CSS > prefix all CSS variables inside preflight 1`] = ` display: block; } - img, video { + img, svg, video { max-width: 100%; height: auto; }