From 37e594254d721a699641f5b2145daab8e5085290 Mon Sep 17 00:00:00 2001 From: Bill Criswell Date: Sun, 10 Aug 2025 16:10:50 -0400 Subject: [PATCH 1/2] Add --border-color to divide theme keys --- packages/tailwindcss/src/utilities.test.ts | 7 +++++++ packages/tailwindcss/src/utilities.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts index 79934c8c044d..4feac35b762b 100644 --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -8843,6 +8843,7 @@ test('divide-color', async () => { css` @theme { --color-red-500: #ef4444; + --border-color-best-blue: #6495ED; } @tailwind utilities; `, @@ -8854,6 +8855,7 @@ test('divide-color', async () => { 'divide-red-500/2.75', 'divide-red-500/[0.5]', 'divide-red-500/[50%]', + 'divide-best-blue', 'divide-current', 'divide-current/50', 'divide-current/[0.5]', @@ -8869,6 +8871,7 @@ test('divide-color', async () => { ).toMatchInlineSnapshot(` ":root, :host { --color-red-500: #ef4444; + --border-color-best-blue: #6495ed; } :where(.divide-\\[\\#0088cc\\] > :not(:last-child)) { @@ -8879,6 +8882,10 @@ test('divide-color', async () => { border-color: oklab(59.9824% -.067 -.124 / .5); } + :where(.divide-best-blue > :not(:last-child)) { + border-color: var(--border-color-best-blue); + } + :where(.divide-current > :not(:last-child)), :where(.divide-current\\/50 > :not(:last-child)) { border-color: currentColor; } diff --git a/packages/tailwindcss/src/utilities.ts b/packages/tailwindcss/src/utilities.ts index 13657f7eb3a7..52088e242f13 100644 --- a/packages/tailwindcss/src/utilities.ts +++ b/packages/tailwindcss/src/utilities.ts @@ -2007,7 +2007,7 @@ export function createUtilities(theme: Theme) { }) colorUtility('divide', { - themeKeys: ['--divide-color', '--color'], + themeKeys: ['--divide-color', '--border-color', '--color'], handle: (value) => [ styleRule(':where(& > :not(:last-child))', [ decl('--tw-sort', 'divide-color'), From 968b6de9beffafca76754f17c79c5b414e78090b Mon Sep 17 00:00:00 2001 From: Bill Criswell Date: Sun, 10 Aug 2025 16:19:19 -0400 Subject: [PATCH 2/2] Changelog update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3971ac3ee235..c1069b2b9324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improve error messages when encountering invalid functional utility names ([#18568](https://github.com/tailwindlabs/tailwindcss/pull/18568)) - Don’t output CSS objects with false or undefined in the AST ([#18571](https://github.com/tailwindlabs/tailwindcss/pull/18571)) - Add option to disable url rewriting in `@tailwindcss/postcss` ([#18321](https://github.com/tailwindlabs/tailwindcss/pull/18321)) +- Add `--border-color` to `divide` theme keys. ([#18704](https://github.com/tailwindlabs/tailwindcss/pull/18704/)) ## [4.1.11] - 2025-06-26