jantimon/next-yak

css prop support

laem opened this issue ยท 9 comments

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 ? 

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?

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

it might be a great addition for very simple layout components

e.g. instead of abstractions like this one:

a stack component

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.

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

When will #78 be merged in?

Thanks!

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

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

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

Released in next-yak 0.2.0