Skip to content

Commit c845b76

Browse files
committed
Add --border-color to divide theme keys
1 parent 1bbbe41 commit c845b76

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/tailwindcss/src/utilities.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8843,6 +8843,7 @@ test('divide-color', async () => {
88438843
css`
88448844
@theme {
88458845
--color-red-500: #ef4444;
8846+
--border-color-best-blue: #6495ED;
88468847
}
88478848
@tailwind utilities;
88488849
`,
@@ -8854,6 +8855,7 @@ test('divide-color', async () => {
88548855
'divide-red-500/2.75',
88558856
'divide-red-500/[0.5]',
88568857
'divide-red-500/[50%]',
8858+
'divide-best-blue',
88578859
'divide-current',
88588860
'divide-current/50',
88598861
'divide-current/[0.5]',
@@ -8869,6 +8871,7 @@ test('divide-color', async () => {
88698871
).toMatchInlineSnapshot(`
88708872
":root, :host {
88718873
--color-red-500: #ef4444;
8874+
--border-color-best-blue: #6495ed;
88728875
}
88738876

88748877
:where(.divide-\\[\\#0088cc\\] > :not(:last-child)) {
@@ -8879,6 +8882,10 @@ test('divide-color', async () => {
88798882
border-color: oklab(59.9824% -.067 -.124 / .5);
88808883
}
88818884

8885+
:where(.divide-best-blue > :not(:last-child)) {
8886+
border-color: var(--border-color-best-blue);
8887+
}
8888+
88828889
:where(.divide-current > :not(:last-child)), :where(.divide-current\\/50 > :not(:last-child)) {
88838890
border-color: currentColor;
88848891
}

packages/tailwindcss/src/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ export function createUtilities(theme: Theme) {
20072007
})
20082008

20092009
colorUtility('divide', {
2010-
themeKeys: ['--divide-color', '--color'],
2010+
themeKeys: ['--divide-color', '--border-color', '--color'],
20112011
handle: (value) => [
20122012
styleRule(':where(& > :not(:last-child))', [
20132013
decl('--tw-sort', 'divide-color'),

0 commit comments

Comments
 (0)