Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename `--font-size-*` variables to `--text-*` ([#14909](https://github.com/tailwindlabs/tailwindcss/pull/14909))
- Rename `--letter-spacing-*` variables to `--tracking-*` ([#14921](https://github.com/tailwindlabs/tailwindcss/pull/14921))
- Revert specificity of `*` variant to match v3 behavior ([#14920](https://github.com/tailwindlabs/tailwindcss/pull/14920))
- Replace `outline-none` with `outline-hidden`, add new simplified `outline-none` utility ([#14926](https://github.com/tailwindlabs/tailwindcss/pull/14926))

## [4.0.0-alpha.31] - 2024-10-29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ test.each([

['blur', 'blur-sm'],
['blur-sm', 'blur-xs'],

['focus:outline-none', 'focus:outline-hidden'],
])('%s => %s', async (candidate, result) => {
let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss";', {
base: __dirname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const LEGACY_CLASS_MAP = {

blur: 'blur-sm',
'blur-sm': 'blur-xs',

'outline-none': 'outline-hidden',
}

const SEEDED = new WeakSet<DesignSystem>()
Expand Down
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