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

styled-components watercooler

November 16, 2017 at 9:01pm
Show previous messages

April 17, 2019 at 1:41pm

It's this issue, I just was writting and I got the "It's closed" message

  • reply
  • like

In my opinion he was very clear in his answer, although it was very terse. It's better to deprecate and allow interoperability -- but that's not what happened to injectGlobal => createGlobalStyle.

  • reply
  • like

That being said, he is right. The codemod should take care of it, and it's better to update the interoperational dependencies rather than not updating them.

  • reply
  • like

Well, maybe there was no room for explanation and I was just giving one ^^

  • reply
  • like

April 18, 2019 at 9:34am

Hi, is there a way to force or warn (maybe via eslint) when styled is not imported via 'styled-components/macro'? In a create-react-app project (not ejected)

  • reply
  • like

April 20, 2019 at 11:28pm

May 12, 2019 at 8:39am

I recently gave a nice update to the styled-components-snippets. I find them still super helpful and time saving. Every second counts. Maybe it'll help you.

VSCode = https://marketplace.visualstudio.com/items?itemName=jonkwheeler.styled-components-snippets

Atom = https://atom.io/packages/styled-components-snippets

Edited
like-fill
1
  • reply
  • like

May 17, 2019 at 9:34am

hellow guys can someone help me ? i have the error below

  • reply
  • like

Cannot resolve module styled-components.

  • reply
  • like

///

import styled from 'styled-components'

  • reply
  • like

Flow error or some other error?

  • reply
  • like

Which tool is throwing the error?

Edited
  • reply
  • like

the flow when i use the yarn run flow

  • reply
  • like

Try to do something like npx flow-typed install styled-components

  • reply
  • like

i have made a revert to package.json and now i am ok but i can not skip this error

  • reply
  • like

i have ignore the flow-typed but still i got it...

  • reply
  • like

May 28, 2019 at 10:40am

Hey guys. Currently facing an issue with defaultProps not being applied in V4. I know this issue is raised https://github.com/styled-components/styled-components/issues/2246 but wanted to reach out and see if anyone can help move along as the associated PR fix has been stuck for several months. Thanks :)

  • reply
  • like

June 19, 2019 at 10:15pm

Let's create a Button component with styled-components. In my menu I want to call my component and change the color. Nothing to specify on the documentation (worked with extends in an earlier version). Today, no color change and a warning in the console. I do not understand.

  • reply
  • like

June 21, 2019 at 10:12am

Nobody ?

  • reply
  • like

June 23, 2019 at 1:25am

I am using styled components with the css prop in a component library I am building. I am also using Rebass. I am using TSDX which uses rollup. It doesn’t seem to be transforming the css prop styles. Any help would be great. Is it a better practice to convert the css props to styled components?

  • reply
  • like

June 24, 2019 at 12:26pm

Anybody knows what it means when your app crashes with the message: Cannot create styled-component for component: [object Object] and you are not using styled components except as a dependency of another library?

  • reply
  • like

June 25, 2019 at 8:01am

Hi Team, We are using grommet with styled component. I am looking for making CSS class name short. What is the purpose of the class name like StyledBox-sc-. How to rename CSS class names at the compilation time.

Edited
  • reply
  • like

June 25, 2019 at 6:37pm

Hi guys is there a specific chat at spectrum , discord etc for web components...

  • reply
  • like

July 20, 2019 at 10:58pm

why is this channel so dead

  • reply
  • like

August 11, 2019 at 9:14am

Hi Team, We are using grommet with styled component. I am looking for making CSS class name short. What is the purpose of the class name like StyledBox-sc-. How to rename CSS class names at the compilation time.

Hi. You usually have class names like "StyledBox-" if you've got this enabled (https://www.styled-components.com/docs/tooling#better-debugging). Otherwise class names generated by Styled components should be rather short, and not include any component names, etc.

Overall, you can't affect how the class names are generated. Most likely you don't have too. This is one of the thing you let the library to be responsible for. Class names are also vital for SSR, so it's important for styled-components to be as close to their generation as possible.

  • reply
  • like