Skip to content

Commit

Permalink
add field-sizing utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
dcastil committed Jan 24, 2025
1 parent 0c46ce9 commit 1134b3e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/lib/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,11 @@ export const getDefaultConfig = () => {
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
*/
'caret-color': [{ caret: [colors] }],
/**
* Field Sizing
* @see https://tailwindcss.com/docs/field-sizing
*/
'field-sizing': [{ 'field-sizing': ['fixed', 'content'] }],
/**
* Pointer Events
* @see https://tailwindcss.com/docs/pointer-events
Expand Down
3 changes: 2 additions & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export type DefaultClassGroupIds =
| 'duration'
| 'ease'
| 'end'
| 'field-sizing'
| 'fill'
| 'filter'
| 'flex-direction'
Expand Down Expand Up @@ -323,8 +324,8 @@ export type DefaultClassGroupIds =
| 'indent'
| 'inset-ring-color'
| 'inset-ring-w'
| 'inset-shadow'
| 'inset-shadow-color'
| 'inset-shadow'
| 'inset-x'
| 'inset-y'
| 'inset'
Expand Down
1 change: 1 addition & 0 deletions tests/class-map.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ test('class map has correct class groups at first part', () => {
duration: ['duration'],
ease: ['ease'],
end: ['end'],
field: ['field-sizing'],
fill: ['fill'],
filter: ['filter'],
fixed: ['position'],
Expand Down
1 change: 1 addition & 0 deletions tests/tailwind-css-versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test('supports Tailwind CSS v4.0 features', () => {
expect(twMerge('ring-4 ring-orange inset-ring inset-ring-3 inset-ring-blue')).toBe(
'ring-4 ring-orange inset-ring-3 inset-ring-blue',
)
expect(twMerge('field-sizing-content field-sizing-fixed')).toBe('field-sizing-fixed')

// TODO: Remove proto
expect(twMerge('')).toBe('')
Expand Down

0 comments on commit 1134b3e

Please sign in to comment.