kabisa / kudos-frontend

The frontend for the Kudos-o-Matic! (Mobile / Desktop)
2 stars 0 forks source link

Look into CSS build ordering issue #155

Closed marcianosr closed 9 months ago

marcianosr commented 9 months ago

On staging / production, the CSS build ordering seems to be going wrong, resulting in weird CSS specificity issues causing wrong styling on certain places.

Temporary fixes are:

sandercamp commented 9 months ago

Some background info: the ui-components package outputs all styling to separate css files that are injected in the html head when building for production. This is standard behavior from rollup + postcss plugin, which sucks. React-scripts puts it output above these stylesheets, hence causing issues with specificity.

I think a quick solution would be to configure the ui-components package so it outputs styling as a single css file that we can than include/import at the correct location.

sandercamp commented 9 months ago

First draft looks to be working: https://github.com/kabisa/kudos-frontend/pull/158