Skip to content

homepage: Fix and-chained custom media queries in production

Administrator requested to merge ps/fix-homepage-and-media-queries into main

Created by: philipp-spiess

Fixes #33108 (closed)

We noticed that the homepage has differing layouts from our dev setup while panels are loading data.

Upon further inspection, the difference were that these lines would not be present in the production build.

We use the postcss-custom-media plugin to compile custom media runes but it seems that when those are chained via and, they do not compile properly in prod:

Screenshot 2022-03-25 at 18 31 43

To fix this, I removed the reliance for it in this instance and added a comment:

Screenshot 2022-03-25 at 18 32 19

Test plan

Panels in loading state now have the same width as the search box:

Screenshot 2022-03-25 at 18 31 57

I also verified that the compiled CSS now contains the right query:

Screenshot 2022-03-25 at 18 32 19

Merge request reports

Loading