Skip to content

RFC: layout: drop use of bootstrap

Erik Faye-Lund requested to merge kusma/mesa3d.org:no-bootstrap into main

We actually use very little of the functionality that Bootstrap provides, and they're not that hard to implement separately, so let's give that a go.

Here's the result (still a bit hacky, but not too bad I think).

There's a few minor differences that I'm aware of:

  1. We no longer have animations when expanding or collapsing the top-menu on mobile devices, as well as the APIs and Drivers lists. To do this and still work reasonably well as a responsive page is surprisingly hard, where we'd need to keep track of multiple states and remember the target height so we can animate towards that, but remove it after the animation is done to avoid it going stale due to device rotations etc. It's a mess, and I think dropping the animations isn't too much of a loss.
  2. The gears and hamburger icons actually line up with the content when the viewport in it's second smallest configuration. I did a quick fix to make it the same, but decided it's probably actually a Bootstrap bug, and looks better this way. Plus the CSS is less insane.
  3. The hamburger icon looks slightly different, because I re-made it rather than copying the one that Bootstrap provides. If anyone cares, I can switch, I believe they are both MIT licensed.

On the upside, we no longer have to provide Bootstrap classes everywhere to provide styling, making a much better separation between styling and content, and making our HTML much more vanilla.

This work is motivated by mesa!8399 (merged), where I had to do some awful hacks to unify the basic CSS from Sphinx and Bootstrap, and I figured, let's give it a try to rip Bootstrap out entirely, so we don't have any needless barriers in the way.

Merge request reports