Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Rename outline-none to outline-hidden
  • Loading branch information
adamwathan committed Nov 8, 2024
commit 60a49fbfb8fd0f8eee89ae7db3e711ad96f56726
Original file line number Diff line number Diff line change
Expand Up @@ -4561,6 +4561,7 @@ exports[`getClassList 1`] = `
"outline-dashed",
"outline-dotted",
"outline-double",
"outline-hidden",
"outline-inherit",
"outline-inherit/0",
"outline-inherit/5",
Expand Down
10 changes: 5 additions & 5 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14355,11 +14355,6 @@ test('outline', async () => {
--color-red-500: #ef4444;
}

.outline-none {
outline-offset: 2px;
outline: 2px solid #0000;
}

.outline {
outline-style: var(--tw-outline-style);
outline-width: 1px;
Expand Down Expand Up @@ -14469,6 +14464,11 @@ test('outline', async () => {
outline-style: double;
}

.outline-none {
--tw-outline-style: none;
outline-style: none;
}

.outline-solid {
--tw-outline-style: solid;
outline-style: solid;
Expand Down
10 changes: 6 additions & 4 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3704,14 +3704,18 @@ export function createUtilities(theme: Theme) {
return atRoot([property('--tw-outline-style', 'solid', '<custom-ident>')])
}

staticUtility('outline-none', [
staticUtility('outline-hidden', [
['outline', '2px solid transparent'],
['outline-offset', '2px'],
])

/**
* @css `outline-style`
*/
staticUtility('outline-none', [
['--tw-outline-style', 'none'],
['outline-style', 'none'],
])
staticUtility('outline-solid', [
['--tw-outline-style', 'solid'],
['outline-style', 'solid'],
Expand Down Expand Up @@ -3939,9 +3943,7 @@ export function createUtilities(theme: Theme) {
),
decl(
'letter-spacing',
options['--tracking']
? `var(--tw-tracking, ${options['--tracking']})`
: undefined,
options['--tracking'] ? `var(--tw-tracking, ${options['--tracking']})` : undefined,
),
decl(
'font-weight',
Expand Down