-
Notifications
You must be signed in to change notification settings - Fork 223
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
OBS-383: Replace LESS with native CSS #6814
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat out of my comfort zone here, so I'm not sure I understand correctly what's going on here.
It looks like this PR adds compiled versions of all the less files. And it looks like in the compiled versions all imports are inlined, and all variables are replaced with their actual values.
What I believe we eventually want is using CSS imports instead of the less imports, and CSS variables instead of the less variables, since this would keep the logical structure and maintainability of the code. Is this what you are trying to do? Or are you going some other route?
Yes! Unfortunately CSS
Yes, ideally we would use CSS variables. However, the entire site style is ripe for a facelift. As I understand, the colors assigned to most/all variables are based on an obsolete "Photon" color palate. I'm happy to take a slight detour to replace all LESS vars with CSS vars, but I wonder if the app would be better served with a deeper look at style. Also, the LESS compiler doesn't offer automatic variable conversion, so the variable work would need to be manual. In defining scope, I decided to focus more on build-tooling, architecture, dependencies, etc, leaving facelifts for future tasks. (Related, jQuery should be replaced too, but also probably out of scope for this first pass.) I intended this refactor to have a light touch on script/style, in order to confirm everything still works as expected with new tooling in place. Happy to continue this discussion if you feel we should spend more time on CSS vars as condition for migration! |
@willkg Sure, I didn't mean to interfere. |
@smarnach I appreciated hearing your thoughts! Thanks for the look 😎 |
This PR transpiles LESS files to CSS – a preliminary step for the front-end refactor.
This PR is intentionally limited in scope for ease of review and logical/modular commits. Further changes to come, including deleting all LESS files, removing the LESS compiler and associated code.
These changes should not result in any visible difference in-browser. The app should still build without issue using django-pipeline. This was tested by following the steps in Production-style Assets, then spot-testing the site in the browser.