menu

styled-components

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

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# Help
view-forward
# jest
view-forward
# Off Topic
view-forward
# Website
view-forward
Team
Posts
Members
Info

How can I insert a @print rule ?

Using this : Expected result : a global rule like this :@print {size: A4 landscape;} Actual result : a global rule like this :{size: A4 landscape;} …

thumbsup
0
message-simple
0

Unstable naming makes caching with etags problematic

Can I make the naming of the g284 part stable (over multiple servers) in data-styled.g284[id="sc-126s5ez-7"]{content:"kuChLP,"}. I'm having cache problems due to that styled components seam to generate new ids on re-render even though nothing has changed. Everything else that…

thumbsup
0
message-simple
0

Cypress and Styled components

Hi!! I'm having the following issue "Uncaught TypeError: Cannot read property 'SC_ATTR' of undefined" on my CI env, not when I run Cypress in headless mode on my local. Does anyone know how to solve it? …

thumbsup
0
message-simple
0

Styled-components + Next.js - flash on refresh

Hi everyone, Recently, I ran into issue on my website. The issue appeared first after I refactored the website to styled components completely. However, since than almost every single time I refresh the website a short flash appears (flash in the meaning that on initial render…

thumbsup
0
message-simple
2

How do I resolve styled.View is not a function error when using with RNW

I'm using styled-components in a react-native-web lerna project with a web/ next.js project and mobile/ expo project. I'm finding in the web project I'm not able to write: However it is possible to write styled(View) I see this documented online as a problem in a few places, but…

thumbsup
0
message-simple
0

Extends a component and add new value to a property that already have value

Hi! I'm wondering if there is a way to do this kind of thing: Lets suppose that we have a styled button in some library that I'm consuming with this styles: …

thumbsup
2
message-simple
0

Only half of styles make it to browser when React app embedded in WebForms app

Has anyone ran into this type of issue when using styled-components in a micro front-end? We're using bootstrap-styled, I'm not sure if that makes a difference.

thumbsup
0
message-simple
0

Should the && operator work in a ternary?

I have the following bit of code, and the pieces of the ternary using the && operator don't work, but the ones without it do...is it supposed to work? I assume I'm doing something wrong, but I don't know what... ...to be clear, props.small ? '20rem' works just fine, but…

thumbsup
0
message-simple
0

Access theme from non-component function?

I'm trying to build "mixin functions" that use the current theme's values, however there's no documented way of accessing the theme values from within a helper function that's not a React component (useTheme hook), or styled-component (props). How else can you access theme? Or…

thumbsup
0
message-simple
1

Theme is undefined in test env

I am testing components with @testing-library/react-native. have a ThemeProvider and using setup guide I have my test But the theme is undefined in styled-component

thumbsup
0
message-simple
0