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

Does anyone know of a way to make the css prop feature work without Babel?

I've been playing with ESBuild and it is SO MUCH FASTER and our projects all seem to be building fine -including the standard "styled" api of SC ...but since there is no Babel plugin, anytime we've used the CSS prop approach these just get left as CSS attributes in the HTML…

thumbsup
0
message-simple
0

Can you convert a input to textarea?

thumbsup
0
message-simple
1

Is it possible to reduce generated class length?

Is it possible to do something like next-optimized-classnames does with modules? I want to reduce class names in production. Any tips or ideas will be gladly accepted.

thumbsup
0
message-simple
0

Not applying styles when using react-native with haul bundler

Hey everyone! :-) This is probably a long shot, but I'll try it anyway. We use styled-components for our component library. When using it with react-native and expo / metro bundler everything works great and as expected. …

thumbsup
0
message-simple
0

theme can't be accessed from within styled component

I know this is the styled-components group, but I have a question for anyone who's set up a styled-components component library using TS. The API and libraries are similar enough and I feel like this group is more active and might be able to help me out... I have a React…

thumbsup
0
message-simple
0

Extending regular React components with styled-components

I recently posted this question on stack overflow - https://stackoverflow.com/q/66576305/864233 - but figured I'd cross post here. Based on the docs, the default styled export accepts "Either a valid react component or a tagname like 'div'." as its only argument. I've emphasized…

thumbsup
0
message-simple
1

Extended component is merging styles, not generating separate classes

I'm running into an issue where extended components are merging their styles under a single class instead of producing separate classes. Here's the simple components I'm testing with: If I run this in CodeSandbox, I get two classes: …

thumbsup
0
message-simple
1

ThemeProvider does not pass theme prop to reactstrap tooltip

Hey everyone, I am trying to use a styled-component inside the reactstrap tooltip, but the theme prop is not present there. The app is encapsulated using the ThemeProvider component to pass the theme across the app to all styled-components. Anything that I am missing here ?

thumbsup
1
message-simple
2

prettier auto-formatting for "css helper" functions not working

Using prettier with eslint as my auto-formatting/linter but formatting isn't working for css helper functions e.g won't get formatted. however, preprending styled.someRandomMethodfont-size:2px;margin:blah;` does format it …

thumbsup
0
message-simple
1

Get CSS styles working with prerender.io

I'm trying to use SSR for my React app. I'm running prerender (https://github.com/prerender/prerender) on my own server. Everything works fine, apart from the styles. I've read the documentation about SSR (https://www.styled-components.com/docs/advanced#server-side-rendering)…

thumbsup
2
message-simple
16