You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then the css injection order in which css file contents are being put as <style> tags in the document header would be following:
index.js > index.scss
NotFoundPage.js > NotFoundPage.scss
If, however, we omit the Page autoimporting that happens behind the scenes and import the component which is being used as Route.page by adding an import explicitly to Routes.js:
import NotFoundPage from "./NotFoundPage";
Then css injection order changes into the following one:
NotFoundPage.js > NotFoundPage.scss
index.js > index.scss
... which can break page styles as it changes the specificity by changing the order in which rules are being applied onto the document.
The text was updated successfully, but these errors were encountered:
jtoar
changed the title
Passing explicitly imported components as Route.page breaks css injection order
Passing explicitly imported components to Route.page breaks css injection order
Jul 19, 2022
Given this setup:
Then the css injection order in which css file contents are being put as <style> tags in the document header would be following:
If, however, we omit the Page autoimporting that happens behind the scenes and import the component which is being used as
Route.page
by adding an import explicitly toRoutes.js
:Then css injection order changes into the following one:
... which can break page styles as it changes the specificity by changing the order in which rules are being applied onto the document.
The text was updated successfully, but these errors were encountered: