Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace builtin block Sass with vanilla CSS #35300

Open
Tracked by #34827
kdmccormick opened this issue Aug 12, 2024 · 4 comments
Open
Tracked by #34827

Replace builtin block Sass with vanilla CSS #35300

kdmccormick opened this issue Aug 12, 2024 · 4 comments
Assignees

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Aug 12, 2024

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
@farhan
Copy link
Contributor

farhan commented Aug 16, 2024

Perhaps duplicate of #35306

@kdmccormick
Copy link
Member Author

@farhan Whereas #35306 concerned converting just the variables, this issue will concern converting the entire files from .scss to .css

@kdmccormick
Copy link
Member Author

@farhan I've filled this one in. Let me know if you have any questions.

@farhan
Copy link
Contributor

farhan commented Oct 1, 2024

I have created following main epic story for per block conversion of sass to css
#35570

After shifting of all the blocks from sass to css we can pick this story and do the left over cleaning.

cc: @kdmccormick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants