From 36dfe1f574ac3adf24d77479faafe9bec563d985 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 20 Dec 2024 15:54:40 +0100 Subject: [PATCH] Rename `bg-round` -> `bg-repeat-round`, `bg-space` -> `bg-repeat-space` (#15462) When we were porting all of the utilities from v3 to v4 we accidentally used the wrong names for these two classes, so this PR fixes that and corrects them back to the names used in v3. | Before | After | | --- | --- | | `bg-round` | `bg-repeat-round` | | `bg-space` | `bg-repeat-space` | --------- Co-authored-by: Adam Wathan --- CHANGELOG.md | 2 +- .../__snapshots__/intellisense.test.ts.snap | 4 ++-- packages/tailwindcss/src/utilities.test.ts | 20 +++++++++---------- packages/tailwindcss/src/utilities.ts | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0435312a3..235f3bd61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use the correct property value for `place-content-between`, `place-content-around`, and `place-content-evenly` utilities ([#15440](https://github.com/tailwindlabs/tailwindcss/pull/15440)) - Don’t detect arbitrary properties when preceded by an escape ([#15456](https://github.com/tailwindlabs/tailwindcss/pull/15456)) +- Fix incorrectly named `bg-round` and `bg-space` utilities to `bg-repeat-round` to `bg-repeat-space` ([#15462](https://github.com/tailwindlabs/tailwindcss/pull/15462)) ### Changed - Removed `--container-prose` in favor of a deprecated `--max-width-prose` theme variable so that `*-prose` is only available for max-width utilities and only for backward compatibility ([#15439](https://github.com/tailwindlabs/tailwindcss/pull/15439)) - ## [4.0.0-beta.8] - 2024-12-17 ### Fixed diff --git a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap index 3c20b11d0..bdaf48177 100644 --- a/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap +++ b/packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap @@ -2179,14 +2179,14 @@ exports[`getClassList 1`] = ` "bg-radial/increasing", "bg-radial/decreasing", "bg-repeat", + "bg-repeat-round", + "bg-repeat-space", "bg-repeat-x", "bg-repeat-y", "bg-right", "bg-right-bottom", "bg-right-top", - "bg-round", "bg-scroll", - "bg-space", "bg-top", "bg-transparent", "bg-transparent/0", diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts index 6851391a4..bd6d29a3b 100644 --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -10499,8 +10499,8 @@ test('bg', async () => { 'bg-no-repeat', 'bg-repeat-x', 'bg-repeat-y', - 'bg-round', - 'bg-space', + 'bg-repeat-round', + 'bg-repeat-space', ], ), ).toMatchInlineSnapshot(` @@ -10935,20 +10935,20 @@ test('bg', async () => { background-repeat: repeat; } + .bg-repeat-round { + background-repeat: round; + } + + .bg-repeat-space { + background-repeat: space; + } + .bg-repeat-x { background-repeat: repeat-x; } .bg-repeat-y { background-repeat: repeat-y; - } - - .bg-round { - background-repeat: round; - } - - .bg-space { - background-repeat: space; }" `) expect( diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts index 6daecd147..4639266e7 100644 --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -2290,8 +2290,8 @@ export function createUtilities(theme: Theme) { staticUtility('bg-no-repeat', [['background-repeat', 'no-repeat']]) staticUtility('bg-repeat-x', [['background-repeat', 'repeat-x']]) staticUtility('bg-repeat-y', [['background-repeat', 'repeat-y']]) - staticUtility('bg-round', [['background-repeat', 'round']]) - staticUtility('bg-space', [['background-repeat', 'space']]) + staticUtility('bg-repeat-round', [['background-repeat', 'round']]) + staticUtility('bg-repeat-space', [['background-repeat', 'space']]) staticUtility('bg-none', [['background-image', 'none']])