-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix escape hash clash * chore: add changeset * chore: add tests
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@pandacss/shared': patch | ||
--- | ||
|
||
Fix issue where `[]` escape hatch clashed with named grid lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { describe, test, expect } from 'vitest' | ||
import { getArbitraryValue } from '../src' | ||
|
||
describe('arbitrary className', () => { | ||
test('simple', () => { | ||
expect(getArbitraryValue('[#3B00B9]')).toMatchInlineSnapshot('"#3B00B9"') | ||
expect(getArbitraryValue('[123px]')).toMatchInlineSnapshot('"123px"') | ||
}) | ||
|
||
test('named grid lines', () => { | ||
expect( | ||
getArbitraryValue(` | ||
[full-start] | ||
minmax(16px, 1fr) | ||
[breakout-start] | ||
minmax(0, 16px) | ||
[content-start] | ||
minmax(min-content, 1024px) | ||
[content-end] | ||
minmax(0, 16px) | ||
[breakout-end] | ||
minmax(16px, 1fr) | ||
[full-end] | ||
`), | ||
).toMatchInlineSnapshot(` | ||
" | ||
[full-start] | ||
minmax(16px, 1fr) | ||
[breakout-start] | ||
minmax(0, 16px) | ||
[content-start] | ||
minmax(min-content, 1024px) | ||
[content-end] | ||
minmax(0, 16px) | ||
[breakout-end] | ||
minmax(16px, 1fr) | ||
[full-end] | ||
" | ||
`) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
657ca5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
panda-docs – ./website
panda-docs-chakra-ui.vercel.app
panda-css.com
panda-docs-git-main-chakra-ui.vercel.app
panda-docs.vercel.app