-
Notifications
You must be signed in to change notification settings - Fork 9
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
Override inline styles #15
Comments
No pitfalls. This is how it's working. That's why you have to import { moveStyles } from 'used-styles/moveStyles';
moveStyles(); |
I can`t understand. Can u provide more complete example? I use simple |
Ok, so that's the problem - critical style extracting is working at the You named two option:
And there is 3rd option:
So what to do
|
But how to detect when real style loading has been finished? We can have many different files with different weight who has different load time. Do we need to wait for all? Or can we use |
No, you are calling it once to move inlined styles above any "real" one. |
Oh ok got it. I just misunderstood. Simple tags order resolve this issue. I thought inlined style (in И спасибо за вклад в эту тему. Не так много людей, кто пишет на тему ssr и в частности потокового рендеренга. |
🤘, I hope it would be useful for you. Don't forget to tell friends :) |
Hello. I want to describe a simple case. Imagine:
Page on an initial state has simple div with class
my-box
and styleWe already get this style as critical in
<style></style>
tag.Later we did API-request add '.extra-class' to our div with 'my-box' class.
Now we have
.my-box
class instyle
tag with hight priority,.my-box
and.extra-class
in CSS file. And margin from.extra-class
will be ignore.Does exist some way to manage inline styles maybe? For ex:
style
tags bygetCriticalStyles
split by source withdata-used-styles
What kind of pitfalls did I miss?
The text was updated successfully, but these errors were encountered: