appsembler / edx-theme-customers

Customer theme configuration and overrides
3 stars 2 forks source link

enable new sass version compiling with fallbacks #198

Closed grozdanowski closed 2 years ago

grozdanowski commented 2 years ago

Change description

SASS compilation still wasn't working properly and I finally figured out why. The code in edx-platform is still trying to replace the _branding-basics.scss file and load the variables as they are in old format of '$varName': [ 'val1', 'val2' ].

Therefore a better system is created where we don't depend on Site Configuration having all the variables, but we only care to override with whichever it has. Also this system is less prone to errors in case of wrong var name etc.

There are three PRs here that go hand-in-hand:

Basically SASS has been done in a way where it will load the following and in exact order:

  1. _tahoe-v2-variables-defaults.scss - holds the default values for variables and makes sure SASS compiles even when variables are not set.
  2. _tahoe-v2-variables-overrides.scss - empty by default, gets overridden by the compiler with values from the site configuration.
  3. _tahoe-v2-variables-adapter.scss - assigns values from new variables into old variables. Allows us to migrate to new variables and naming without messing with all the styles. Replaces the _branding-basics.scss file.

Type of change

Related issues

Fix [#1]()

Checklists

Development

Security

Code review