Give templates more control over CSS ordering.

Review Request #10663 — Created Aug. 15, 2019 and submitted

chipx86
Review Board
release-4.0.x
2a63128...
reviewboard

Historically, our base template injected the "common" CSS bundle and
then loaded any per-page bundles. Despite the base block for CSS bundles
being empty, most pages were good citizens and had a {{block.super}}
anyway. Some did not.

The "common" bundle loads a lot of stylesheets, and given how we're
flattening so many of them (to help with overriding values), we're
starting to hit cases where the order in which stylesheets are loading
are beginning to matter more.

For example, the new admin UI is hitting issues where the Django styles
(which are being loaded after our common styles) are taking precedence.
We're also seeing this with upcoming datagrid style changes, where our
common styles (loaded first) are being overridden by Djblets styles
(loaded second).

We now load the common styles within the "css" bundle, giving templates
the ability to load other styles before our common styles.

This has the potential to break extensions that are overriding "css" but
not calling {{block.super}}. Those extensions will need to update
their templates appropriately.

Checked every affected page in this change. Didn't see any regressions.

Went through every template we ship that overrides the "css" block,
checking that {{block.super}} was being called and that orders made
sense.

Checked every other extension we ship to make sure that no other
packages are affected.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (123665f)
Loading...