Update CSS bundles to use a central file per bundle.
Review Request #12966 — Created April 20, 2023 and submitted
Our main Pipeline CSS bundles (
include a single file for the Review Board codebase, which is
responsible for importing all other files in the bundle.
This has a number of advantages:
Rules can be more easily combined and deduplicated, such as when
Relative paths (for image files) can be simplified, since all files
now come from a central place.
We'll be able to use Less plugins that can optimize rules across the
resulting CSS file.
There are fewer files to load per page during development.
This has required some cleanup in places.
@import statements now use
the absolute (e.g.,
rb/css/...) paths in all cases, which appears to
avoid some issues with how LessCSS determines whether it's processed a
A lot of old path-relative code (for
url()s) has also been replaced,
and paths made standardized with some new variables in
All bundle entrypoints live in
css/bundles/, rather than having a
directory per bundle. There are two reasons for this:
We'll probably end up merging bundles together soon. Maybe most of
them. It'd be ideal not to have to keep moving files around.
Extensions can import these files as references, to make use of
functions or variables, making these hard to move.
This ends up shrinking the bundles quite a bit:
admindrops from 45KB to 44KB
commondrops from 359KB to 246KB
reviewsdrops from 146KB to 129KB
Tested the dashboard, review request page, diff viewer, and various
pages in the admin UI.
Tested building the package.