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
Chat
Members
Info
down-caret

Is it possible to style an imported generic functional component?

I'm importing a generic functional component, and hoping to override the padding styles on it. I'm trying to do something like this: I'm having trouble finding an example of this done anywhere. I know I could just wrap SomeGenericComponent in a wrapper to style it how I want,…

thumbsup
0
message-simple
9

Wondering if anyone can help me with the idea of globally adding border during…

Details here. https://stackoverflow.com/q/59958836/25197

thumbsup
0
message-simple
2

Can we use `disableVendorPrefixes` and `disableCSSOMInjection` with TypeScript?

I'd like to use disableVendorPrefixes and disableCSSOMInjection which are introduced by v5 with TypeScript. But, when I use it, there is a typescript error. (TS2769: No overload matches this call.) It seems @types/styled-components doesn't support v5 but is there any way to use…

thumbsup
0
message-simple
0

Best practice when styling Components that are made of multiple elements

How do you style for example this: <header> <svg/> …

thumbsup
0
message-simple
9

How come this breaks my formatter?

I am always a bit thrown by the tagged template literal syntax, but when I include the below in my js file, it breaks all the formatting / code highlighting after. Do i need some extra settings?

thumbsup
0
message-simple
2

styles missing in cra production build but not in dev

Hi Thanks for any help in advance. Really appreciate it. I have created a website using chartjs and styled components really for the first time using either and it works fine in development. But when I build the production build using 'npm run build' most of the css is now…

thumbsup
0
message-simple
9

Methods and Template String

Hey guys! I was creating a component and I was really missing MIXINS from SASS, so I decided to create something like that: And than, call the method like that: …

thumbsup
0
message-simple
4

Filtered props from HTML with "as" polymorphic prop

Because there is no good way to filter out attributes from the final HTML element, I've been using an HOC to handle it. It's important for us because AMP pages fail validation if it doesn't recognize HTML attributes. Used like so: Unfortunately if I use the polymorphic prop as…

thumbsup
0
message-simple
2

Using input :Focus

Hello I have the following context: styled: const SearchWrapper = styled(FlexCotainer)` …

thumbsup
0
message-simple
1

Using two className on div with styled:

Hello I'm trying to find a solution on how to do something like this with the styled: <div class="components__Content-sc-1njz8to-0 hsmAoo"> </div> …

thumbsup
0
message-simple
1