menu

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Team
Posts
Chat
Members
Info
down-caret

@import of Google Font not working in v5

I have an import of a google font in my createGlobalStyle that was previously working with v4 of styled-components. Now it doesn't seem to be getting loaded in at all. Has anyone else had this issue? Will create a github issue if this is a new. Thanks!

thumbsup
0
message-simple
3

css prop doesn't work with CRA

I tried to use css prop to style div on my project created with CRA but it doesn't work for some reason. I import styled-components via import styled from 'styled-components/macro'; and it still doesn't work. And here are my code I'm hoping someone can help me out here. Thank…

thumbsup
0
message-simple
3

[SOLVED]:Extending Styled Components seems doesn't work in beta releasing.

I'm moving to use styled component and everything goes well except that extending style doesn't work at all, I'm trying to rewrite my styled component ( Button ) by using const NewButton = styled(Button)// some new style …

thumbsup
0
message-simple
5

Conditional Check for Prop Value that Is NOT a String

I have a prop that is being passed a function like this: <Icon name={Facebook} /> Facebook is a reference to another component being brought in by react-icons. …

thumbsup
0
message-simple
2

global style with nextjs in production

I've migrated from emotion to styled component after the last superb release. However in the local production it seems that the global style in the Layout doesn't work. to make sure that it's not a Next.js issue I test it out with emotion and it did well. In _app.js …

thumbsup
0
message-simple
1

null value generate when using ::before

Has anyone experienced a null value being generated in the compiled stylesheet when using ::before? My code and compiled css works file 'til I add the pseudo selector to my code. When I add it null shows up as a value in dev tools. Everything works as expected 'til I add the…

thumbsup
0
message-simple
1

Tailwind vs Styled Components

I’ve used emotion/styled and SC for a while. I see a lot of hype around tailwind css and similar atomic css libraries. It looks like you could use SC and TW together, but you’d likely want most of your code in TW if you decided it was the better approach. What are people’s…

thumbsup
0
message-simple
2

Help with style tag order.

Something just happened recently and now my styled-components tag is rendering above the other style tags. And so all the styles with the same specificity aren't working. Anyone know what might be going on?

thumbsup
0
message-simple
1

How can I use the css grid with styled components

I'm trying to figure out how to setup a responsive grid layout and style my components with styled components? If further info is needed, please let me know and I'll gladly provide all needed info! Thanks in advance!

thumbsup
0
message-simple
0

Can you add dynamic props to the theme object that is passed via ThemeProvider?

I need to use the current window width in my styled components' css. For that I have build a custom hook that listens to the resize event and I pass the result to a Context Provider I wrapped around my App. Now I can use that context when I need it like that: Now I was thinking:…

thumbsup
0
message-simple
7