Add support for css
prop on custom elements
#2883
-
The problem Using the Input <my-component css={css`color:red`}></my-component> Current output <style data-emotion="css" data-s="">.css-q3dxqh{color:red;}</style>
<my-component css="css-q3dxqh"></my-component> Proposed solution Detect Expected output <style data-emotion="css" data-s="">.css-q3dxqh{color:red;}</style>
<my-component class="css-q3dxqh"></my-component> Additional context The only issue I have observed for this exact case is the incorrect attribute. There was discussion in 2018 that may be relevant. #1071 I'd love to help but not sure exactly where to start. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Which package are you importing the |
Beta Was this translation helpful? Give feedback.
-
@srmagura I'm using |
Beta Was this translation helpful? Give feedback.
-
When using the Also, it looks as though you have not configured the |
Beta Was this translation helpful? Give feedback.
-
Note that if you are using web components and you are only interested in using the <my-component class={css`color:red`}></my-component> |
Beta Was this translation helpful? Give feedback.
Note that if you are using web components and you are only interested in using the
@emotion/css
package then you can just use theclass
prop: