Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css prop support #77

Closed
laem opened this issue Mar 1, 2024 · 9 comments · Fixed by #78
Closed

css prop support #77

laem opened this issue Mar 1, 2024 · 9 comments · Fixed by #78

Comments

@laem
Copy link

laem commented Mar 1, 2024

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
Copy link
Collaborator

Mad-Kat commented Mar 1, 2024

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
Copy link
Author

laem commented Mar 4, 2024

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

@jantimon
Copy link
Owner

jantimon commented Mar 9, 2024

it might be a great addition for very simple layout components

e.g. instead of abstractions like this one:

a stack component

@laem
Copy link
Author

laem commented Mar 10, 2024

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
Copy link

paulm17 commented May 20, 2024

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!

@jantimon
Copy link
Owner

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

@jantimon
Copy link
Owner

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
Copy link
Owner

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

@jantimon
Copy link
Owner

Released in next-yak 0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants