mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Remove bare value handling for perspective utilities (#13288)
* Remove bare value handling for perspective utilities * move `perspective-123` example This is now moved to the spot where we ensure that nothing is generated at all. This prevents us from accidentally updating a snapshot and missing a potential bug. * update changelog --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
parent
d25fe81da8
commit
89a0b86e73
@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Added
|
||||
|
||||
- Add `inherit` as a universal color ([#13258](https://github.com/tailwindlabs/tailwindcss/pull/13258))
|
||||
- Add 3D transform utilities ([#13248](https://github.com/tailwindlabs/tailwindcss/pull/13248))
|
||||
- Add 3D transform utilities ([#13248](https://github.com/tailwindlabs/tailwindcss/pull/13248), [#13288](https://github.com/tailwindlabs/tailwindcss/pull/13288))
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@ -3128,13 +3128,7 @@ test('perspective', () => {
|
||||
}
|
||||
@tailwind utilities;
|
||||
`,
|
||||
[
|
||||
'perspective-normal',
|
||||
'perspective-dramatic',
|
||||
'perspective-none',
|
||||
'perspective-123',
|
||||
'perspective-[456px]',
|
||||
],
|
||||
['perspective-normal', 'perspective-dramatic', 'perspective-none', 'perspective-[456px]'],
|
||||
),
|
||||
).toMatchInlineSnapshot(`
|
||||
":root {
|
||||
@ -3142,10 +3136,6 @@ test('perspective', () => {
|
||||
--perspective-normal: 500px;
|
||||
}
|
||||
|
||||
.perspective-123 {
|
||||
perspective: 123px;
|
||||
}
|
||||
|
||||
.perspective-\\[456px\\] {
|
||||
perspective: 456px;
|
||||
}
|
||||
@ -3162,7 +3152,7 @@ test('perspective', () => {
|
||||
perspective: 500px;
|
||||
}"
|
||||
`)
|
||||
expect(run(['perspective', '-perspective', 'perspective-potato'])).toEqual('')
|
||||
expect(run(['perspective', '-perspective', 'perspective-potato', 'perspective-123'])).toEqual('')
|
||||
})
|
||||
|
||||
test('cursor', () => {
|
||||
|
||||
@ -1501,10 +1501,6 @@ export function createUtilities(theme: Theme) {
|
||||
staticUtility('perspective-none', [['perspective', 'none']])
|
||||
functionalUtility('perspective', {
|
||||
themeKeys: ['--perspective'],
|
||||
handleBareValue: ({ value }) => {
|
||||
if (!Number.isInteger(Number(value))) return null
|
||||
return `${value}px`
|
||||
},
|
||||
handle: (value) => [decl('perspective', value)],
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user