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
down-caret

Cascading/Bleeding to children

In Angular and I suppose Svelte you create scoped CSS which is entirely scoped to the component via a generated attribute selector. I am liking the API of emotion, however is there a way to disable the cascading or rather bleeding css properties to the children? If not do you…

thumbsup
0
message-simple
1

Anyone suddenly missing highlighting/intellisense in VS Code?

Was working great a few days ago; all css in css template literal was highlighted as CSS, intellisense worked as if it was css... Suddenly today VS Code seems to think its just a string. I don't think I added/removed any extensions or changed any settings. Not sure what I'm…

thumbsup
0
message-simple
2

Getting css to work with create-react-app

I'm struggling with getting css to work with create-react-app. Using styled works. This results in You have tried to stringify object returned from css function. It isn't supposed to be used directly (e.g. as value of the className prop), but rather handed to emotion so it can…

thumbsup
0
message-simple
2

v11: @emotion/css vs @emotion/react, in Gatsby

I've been playing around with v11, planning a utility/atomic style framework implementation, and finding I prefer the ergonomics of @emotion/css and className (Vanilla), to @emotion/react and the css prop. Are there disadvantages or hurdles I have to overcome re SSR etc if I…

thumbsup
0
message-simple
6

Is there a way to disable themeing altogether?

I'm looking for a way to completely avoid the creation of theme Provider and Consumer components in my app. Most of my theme is static and can be consumed by exporting the functions that reference it from a factory function in which theme is in scope. The dynamic aspects of…

thumbsup
0
message-simple
2

Why use ThemeProvider?

Hello, I don't know how to use "ThemeProvider" in my react application, could someone help me? And I also have a second question. What's the point of using the theme provider? …

thumbsup
0
message-simple
3

Not sure how to compose using styled prop

https://gist.github.com/x4th/07333d5746b8083c487ba14a6b63e3b4 Now, if I want to create variations of my Button such as PrimaryButton, SecondaryButton and do const PrimaryButton = styled(Button)... my small, large, warning props might get overwritten. What's the proper way to do…

thumbsup
0
message-simple
1

Emotion with External CSS

Hello. Is it possible to use emotion and styles from an external file? For example using CSS utility library like tailwind and combing it with emotion? If yes, how to you combine it inline? I have tried this: const styles = css({ backgroundColor: colors.primary.P100, …

thumbsup
0
message-simple
1

Babel plugin for label support not working with nextjs

Hi, I'm using [email protected] via theme-ui in a [email protected] project with babel-plugin-emotion and autoLabel: true in .babelrc but I can't get the labels to show up as class names in my HTML output. In fact, it looks like it doesn't matter at all what I set in .babelrc for the…

thumbsup
0
message-simple
0

Next.js example and CacheProvider (v11)

In the nextjs example, why does the custom _app use the CacheProvider? https://github.com/zeit/next.js/blob/canary/examples/with-emotion-11/pages/_app.js#L10

thumbsup
0
message-simple
4