Replace deprecated SCSS gem
What does this MR do and why?
Removes SCSS (Sass) processing and CSS compilation from Nanoc. The Ruby Sass gem is no longer maintained, and the underlying libsass library is deprecated.
This MR adds Dart Sass. Both the GitLab UI and main GitLab projects use this package as well.
Compile time isn't very different from before (make compile
, which still compiles both Nanoc and Sass, just in separate steps now, runs about 2 seconds faster), but being able to compile CSS outside of Nanoc will make frontend development significantly quicker.
Closes #1300 (closed)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Update dependencies: make setup
-
Compile and view the site: make view
-
Verify there are no build errors or visual changes on the site. -
Run a CSS compile locally: yarn compile:css
(Output should just look something like this:✨ Done in 1.37s.
) -
Run yarn watch:css
and edit a SCSS file, then verify your change is reflected on the site after a page refresh. Adding adisplay: none;
to the firstbody
selector incontent/assets/stylesheets/stylesheet.scss
is a nice obvious one to try out😸
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.