menu

emotion

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

Channels
# All channels
view-forward
# General
view-forward
# Development
view-forward
# Help
view-forward
# Off Topic
view-forward
Team
Posts
Members
Info

Bundling a component into an ES module

I'm having trouble bundling a React component that uses @emotion/core (with the css prop) into an ES module. I can properly build and bundle my component, but when used in a dependent (a separate project) that tries to import the ES module, I kept getting the following message…

thumbsup
0
message-simple
3

Why is my h2 heading not red?

I'm struggling to understand why the following example isn't working using the withComponent method on a styled component wrapping a JSX component wrapping a styled component. Am I going mad or missing something obvious? https://codesandbox.io/s/emotion-issue-template-g4jni I'd…

thumbsup
0
message-simple
2

How can I apply styles using emotion to a NavLink in React

const StyledNavLink = styled(NavLink)(props => ({ width: '100%', height: '59px', …

thumbsup
0
message-simple
2

is there a way to control the transparency of a color similar LESS fade() ?

thumbsup
0
message-simple
3

"css" prop adds "styles" to element class definition

https://github.com/emotion-js/emotion/issues/1783 Has anyone ever come across this? Losing hair with this here...

thumbsup
0
message-simple
0

Global in react-native App.js

Hey all -- I've used Global from @emotion/core in react projects before, but when I tried to add it in the App.js of a react-native project, it throws an error: null is not an object (evaluating 'this.props.cache.key') react native emotion …

thumbsup
0
message-simple
2

Background in the body layout of Global property from @emotion core

Hello everyone, I am trying to add a svg background image to the html body element. Do you know how I can do this? I have tried // Layout.js …

thumbsup
0
message-simple
1

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
1
message-simple
3

How to handle third party libs css?

Hello, who can suggest how to handle third party libs css? Is there a way to auto import them and use as style? I was thinking to use composition but it doesn't work with ssr... Or maybe I miss something? Thanks.

thumbsup
0
message-simple
3

Emotion 10 class names in tests

I am converting from CSS Modules to Emotion and am having trouble with testing. Some of my tests check that certain class names get applied when their corresponding prop is passed to the component. CSS Modules allows you to disable the hashing/labeling and get the raw class name…

thumbsup
0
message-simple
8