chakra-ui / panda

🐼 Universal, Type-Safe, CSS-in-JS Framework for Product Teams ⚡️
https://panda-css.com
MIT License
5.23k stars 236 forks source link

lineClamp with values `1`,`2`,1 & 2 not working as expected #822

Closed omarkhatibco closed 1 year ago

omarkhatibco commented 1 year ago

Description

Hello,

So I was testing lineClamp in panda and when I provide both 1 and 2 as number or even string, the values are bing translated to 1px or 2px, the expected behaviour is to be just a number.

Link to Reproduction

https://codesandbox.io/p/github/omarkhatibco/pandacss-test/main?file=%2Fsrc%2FApp.tsx%3A1%2C1&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj3g2y4k000b3b6nca8rhglx%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj3g2y4k000d3b6npw8t91vd%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clj3g2y4k000b3b6nca8rhglx%2522%253A%257B%2522id%2522%253A%2522clj3g2y4k000b3b6nca8rhglx%2522%252C%2522activeTabId%2522%253A%2522clj68o72000613b6oi5qawc4e%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clj3g2y4k000a3b6ne53qyvb8%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Ftsconfig.node.json%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.tsx%2522%252C%2522id%2522%253A%2522clj68o72000613b6oi5qawc4e%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clj7ma6l000603b6nvsblxl9s%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clj7ma6u7005cfwgn8ts8gj5d%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fstyled-system%252Frecipes%252Fbutton-recipe.mjs%2522%252C%2522id%2522%253A%2522cljata9m400gc3b6n26dfc20h%2522%252C%2522mode%2522%253A%2522temporary%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%257D%252C%2522clj3g2y4k000d3b6npw8t91vd%2522%253A%257B%2522id%2522%253A%2522clj3g2y4k000d3b6npw8t91vd%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522clj3g527g00h73b6nc0l440p1%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A5173%252C%2522id%2522%253A%2522clj3g55w900na3b6n5jyzb1zg%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clj3g55w900na3b6n5jyzb1zg%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

Steps to reproduce

Check styled.p component

JS Framework

React TS

Panda CSS Version

0.4.0

Browser

Latest

Operating System

Additional Information

No response

segunadebayo commented 1 year ago

Duplicate of #818

Fix already in; we'll release an update shortly.