Skip to content

Ensure utilities are loaded after page specific bundles

Lukas 'ai-pi' Eipert requested to merge leipert-fix-utility-import-order into master

What does this MR do?

Extract CSS utilities into separate files

When we extract page specific CSS, they sometimes overwrite our utility classes and and force us to use important! utility classes. 0

In order to make our utilities take precendence, we split them off, so we can import them later. Note that we have to do it once for light mode and dark mode.

Add helper method for adding page specific styles

In order to ensure that our page specific styles are loaded

  • after our application CSS
  • before our utility classes
  • just once
  • deferred
  • and not in the body of the HTML

this adds a helper method to do exactly that.

Before we either imported it in the body or re-used the existing page_specific_javascripts, which both are not super nice.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Lukas 'ai-pi' Eipert

Merge request reports