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
118 stars 4 forks source link

css prop support #77

Closed laem closed 5 months ago

laem commented 8 months ago

Hi, very interesting project. I'm making a heavy use of styled-components's css prop.

E.g.


<div css={`
background: grey; 
strong {color: pink}
`}>my <strong>content</strong></div>
```. 

Is it supported ? 
Mad-Kat commented 8 months ago

Hey @laem

Thank you for opening this issue. We don't support styled-components css prop yet, but it would definitely be doable.

Out of curiosity - How did you find out about this project?

laem commented 7 months ago

Hi, good question. I don't remember how I found it. Maybe "linaria + next" in Kagi + some more links on github ?

jantimon commented 7 months ago

it might be a great addition for very simple layout components

e.g. instead of abstractions like this one:

a stack component

laem commented 7 months ago

Yes, I often use it for components that need just a bit of styling, do not justify creating a new ui component file, and also that are not used twiced in the app.

paulm17 commented 5 months ago

I found this repo via: https://www.joshwcomeau.com/react/css-in-rsc/#the-list-goes-on-10

When will https://github.com/jantimon/next-yak/pull/78 be merged in?

Thanks!

jantimon commented 5 months ago

I'll discuss it with @Mad-Kat today and will give you an update

jantimon commented 5 months ago

css prop has some complicated edge cases

however we discussed internally and decided to ship a first version which won't cover all edge cases soon

jantimon commented 5 months ago

short update - #78 took some rounds to find the optimal solution but I believe it is getting really close to be released

jantimon commented 5 months ago

Released in next-yak 0.2.0

laem commented 1 week ago

Seems to be gone but soon reintroduced #169

Mad-Kat commented 6 days ago

Exactly. With the move from Babel to SWC, we lost the ability. Should be finished after my holidays