Skip to content

Replace builtin block Sass with vanilla CSS #35300

@kdmccormick

Description

@kdmccormick

Background

Follows up from:

The goal of this task is to entirely convert the Sass in the ./xmodule/ directory into vanilla CSS which can be loaded with the standard ResourceLoader class from xblock.utils. The immediate benefit is that we can remove the xmodule Sass build steps from edx-platform. The longer-term benefit is that this will remove any Sass build concerns from the xblock extraction effort.

Tasks

  1. Ensure Sass has been compiled into uncompressed CSS (npm run compile-sass-dev).
  2. Copy all the built-in compiled XBlock CSS (lms/static/css/*Display.css and lms/static/css/*Editor.css) into xmodule/assets. Add those CSS files to version control.
  3. For each XBlock with Sass: Replace its add_sass_to_fragment call with standard usage of a xblock.utils.resources.ResourceLoader and fragment.add_css.
  4. Remove the definition of add_sass_to_fragment from xmodule.util.builtin_assets.py
  5. Remove all .scss files under xmodule/assets
  6. Remove all compile_sass_dir(...) calls in scripts/compile_sass.sh which compile Sass under xmodule/assets.
  7. Update xmodule/assets/README.rst

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions