menu

emotion

Emotion is a css-in-js library focused on performance and developer experience

Channels
Team
Posts
Members
Info
Search
Si·4d

What is the best way to passing props to sub components with emotion and ts?

For example, I have 2 components Hero and HeroBody. The high of herobody is based on the size prop of Hero.

thumbsup
0
message-simple
0

How do I use the `as` prop with reach router?

I want to use getProps on the Link component with a styled link, how can I do something like that? here's my test case: https://codesandbox.io/s/nkmol543mp

thumbsup
0
message-simple
0

@emotion/babel-preset-css-prop with @babel/register issues

Hey all - I'm having a heck of a time getting @emotion/babel-preset-css-prop to work with my SSR setup - and it seems to mess up as soon as I try to import any JSX with an import station and I get the ol' Unexpected token import, however when importing a js file that uses import…

thumbsup
0
message-simple
0

Does emotion work with IE9? What browsers do emotion support?

thumbsup
0
message-simple
0

Emotion with Next.js

Hi, I am developing a project with next.js and emotion 10 and I noticed that in compiled output (when opening 'view source' in browser) styles are inserted in severals <styles />s tags under <body /> tag... (one for each class). I checked other Emotion projects from Emotion…

thumbsup
0
message-simple
0

Use Scss mixins with Emotion

I have a scss library that I wrote and would like to use in a React project. I also need to scope styles within each component. Similar to the way Vue can scope styles. Is this possible with Emotion?

thumbsup
0
message-simple
0

Emotion with SCSS/CSS variables

Is it possible to use Emotion together with a theme so I can reuse SCSS or even CSS variables inside a component? like this: or this: …

thumbsup
0
message-simple
0

When using Emotion-React together with Typescript, what is the difference…

I asked the following question on Stackoverflow a few days ago, and received no answer. I'm trying to add types to my StyledComponents (Emotion-React). Lets say I have a styled Button component, when I declare it's type with the generic StyledComponent I'm required to pass 3…

thumbsup
0
message-simple
0

create-react-app css prop

Hey all. I've seen styled-components take advantage of Create React App's support via its macro: https://medium.com/styled-components/css-prop-support-for-create-react-app-37e8c5d96861 …

thumbsup
0
message-simple
0

Debugging

How do you debug the whole CSS currently injected in the page? For example if I have a code like this: With SCSS, I'd immediately see this error when debugging the CSS file with my IDE, but with Styled Components and Emotion, the CSS is minified and I'll miss this.

thumbsup
0
message-simple
0