addyosmani / addyosmani/critical
Mismatch in computed styles after critical
- Lingua principale
- JavaScript
- Stelle
- 10.3k
- Fork
- 390
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
After using critical, there's a mismatch in the computed styles:

[Without critical](https://pwapp-24858.web.app/dash), and [with critical](https://pwapp-24858.web.app/critical)
If you patiently inspect the styles, you see there's a mismatch in the computed styles, especially `border-radius`
I tried to [fix the issue](https://github.com/espoal/pwapp/blob/main/libs/critical/index.mjs) by using `forceInclude` to no avail. It seems that when splitting the styles, the `uncritical.css` gets precedence over the inlined styles.
Btw: Amazing project. I took a commercial dashboard, whose load time was around 10 second, and I brought it to 2 seconds with a lot of work (ssr, lazy load, minification...) and then to 0.8 seconds with critical. This npm had by far the most impact, with the least amount of work, it should be advertised everywhere.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.