wvuweb / cleanslate-cms

A place to file issues and view releases for CleanSlate CMS. http://cleanslatecms.wvu.edu
6 stars 0 forks source link

CleanSlate won't serve Bootstrap v5.2+ CSS (sass-rails gem update?) #275

Open adamjohnson opened 1 year ago

adamjohnson commented 1 year ago

Steps to reproduce the issue

There are two ways to reproduce this. 1) Use one of Bootstrap's starters projects to just get going on a vanilla Bootstrap v5.2 project OR use a branch on the WVU Design System v2. The instructions below are for the WVU Design System v2 theme on Github.

  1. I created a branch called bootstrap-52 in the WVU Design System v2 theme on Github. We can use this branch to test our changes.
  2. Log into Staging.
  3. Go to Themes and search for "University Relations: WVU Design System Version 2.0".
  4. Hit "Sync theme".
  5. Hit "Edit theme" and switch the branch to bootstrap-52.
  6. Go to the "WVU Design System v2 Demo Site" and view the homepage.

Results

You should see a bare HTML page without CSS styles, like this:

A page in CleanSlate showing mostly straight HTML without styles

If you open styles.css, you'll see a message:

Holy moly, we just blew a fuse!

...with the specific error from Bootstrap's CSS. It looks like CleanSlate (or, more likely, the sass-rails gem) doesn't want to parse CSS Custom Properties when combined with an SVG Data URI.

The specific file from Bootstrap is _navbar.scss. You can see the specific line in the compiled CSS.

Expected results

The goal here is to have CleanSlate serve our CSS file.

It looks like we use v5.0.7 of the sass-rails gem in CleanSlate, released November 14, 2017. v5.1.0 was released August 16, 2019 and is the nearest v5.x release to us. There's also v6 released on August 16, 2019 if we want to upgrade.

Would updating the sass-rails gem would fix this issue? If we still used Vagrant, I could submit a PR because I knew how to update gems in that environment. Now, with Docker, you'd probably have to walk me through it.