-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for CSS-in-JS styling with emotion
#95557
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
Pinging @elastic/eui-design (EUI) |
This is a high priority for the Canvas solution, as we're targeting a change to how renderers work, (i.e. removing CSS class names from elements in workpads). We'll need this in place in 7.x, the sooner the better, to target 8.0. |
Adding some more detailed information to see if any further questions or ideas get raised. This PoC commit and PR lays the groundwork for adding Emotion to Kibana. Using The babel configuration likely requires the most input from the ops team. The It's also important to note that this initial work to add Emotion is not dependent on anything from EUI. However, future work to enable EUI's in-progress theme provider will require that Emotion be in place before it can be used in Kibana. |
@thompsongl, thanks for creating the POC. Want to open that PR on the Kibana repository so we can raise any feedback here? |
Can do. I'll likely have something up this week. |
In advance of EUI's switch from Sass to CSS-in-JS, we want to add the Emotion library to Kibana and allow teams (cc// @clintandrewhall) to begin using its features.
Similar to how
styled-components
is handled, I anticipate adding@emotion/react
tokbn-shared-ui-deps
.Other considerations (from EUI's proof-of-concept work):
@emotion/babel-preset-css-prop
and enable eitheremotion
orstyled-components
on a file-/directory-/app-basis.styled-components
styled-components
and@emotion/react
areimport
ed in the same file@emotion/jest
enables deterministic style and className generation for otherwise hashed classes.styled-components
EUI Timeline:
@emotion/react
to itspeerDependencies
.I am happy to contribute as much or as little code as is helpful/efficient for the ops team.
The text was updated successfully, but these errors were encountered: