-
Notifications
You must be signed in to change notification settings - Fork 27
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
Style not applied when using returned component #27
Comments
Is the SSR script getting included on the page? Ie are you using I'm pretty sure this works pure client-side. As for server-side I'm just guessing. A reproduction could help narrow this down. |
Nope, I am not using extractCss. The picture have shown all the code I have. I do not quite understand how to use it. So if I want to export the component. Do I need to export the CSS style separately? |
Yeah with CSS in JS libraries you need to put the CSS on the page when you SSR. To be fair I have no clue how to do this with Astro. But generally you call |
I made a failed attempt here: https://stackblitz.com/edit/github-rqtizn-easxa3?file=astro.config.mjs. The integration does not work because |
Yeah all CSS in JS libraries generally work this way requiring a way to serialize it out with something like |
I was staring at the adapter API yesterday and thought that the one place that make sense is through: https://docs.astro.build/en/reference/integrations-reference/#injectscript-option but this obviously does not work because Astro does not have an API to add to |
@BulliedBeginner Also when creating an issue, I'd generally recommend to :
Otherwise, it makes it harder for people who may want to help. |
When I pass an object which is already created inside function, the style is not applied.
The background supposed to become red and I should have flexbox layout shown inside the developer tool.
I am using Astro JS as framework. Therefore if this is not a bug, the problem might occur inside Astro JS
The text was updated successfully, but these errors were encountered: