Skip to content

Move white_base CSS to a mixin

Stanislav Lashmanov requested to merge slashmanov/move-white-base-to-mixin into master

What does this MR do and why?

This is a preparation step for Move CSS compilation to Vite Ruby (!152044 - merged).

SASS doesn't allow parent selector (&) to be used on a top-level. That is the case with app/assets/stylesheets/highlight/white_base.scss, which is in fact used as a mixin but SASS doesn't know about that. That causes SASS to produce an error during compilation with Vite Ruby.

This MR fixes the issue by:

  1. Wrapping all the CSS in that file with a new mixin called white-base.
  2. Rewriting how the white_base is used in the white.scss stylesheet.
  3. Prefixing the white_base file name with _ to indicate that it's a dependency of another SASS file, not the actual stylesheet.

No visual change expected.

How to set up and validate locally

  1. Ensure you have white code theme selected in your preferences
  2. Go to any merge request with changes
  3. Observe no change
Edited by Stanislav Lashmanov

Merge request reports