jantimon / next-yak

a streamlined CSS-in-JS solution tailor-made for Next.js, seamlessly combining the expressive power of styled-components syntax with efficient build-time extraction and minimal runtime footprint, ensuring optimal performance and easy integration with existing atomic CSS frameworks like Tailwind CSS
https://yak.js.org
108 stars 2 forks source link

css unit concatination may lead to `falsepx`, `nullpx` and `undefinedpx` #122

Closed jantimon closed 1 month ago

jantimon commented 1 month ago

right now we transpile

width: ${({ $letters }) => $letters}px;

to

css(__styleYak.buttonStyles__$active, {
  style: {
    "--buttonStyles__$active__width_o1wkyu": ({ $letters }) => $letters + "px"
  }
})

however if $letter is falsy it would be set to a quite stange value