Skip to content

Commit

Permalink
Switch to themeVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Jun 19, 2024
1 parent 0beccea commit 67af278
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions grunt/tasks/less.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function(grunt) {
}
}

if (configJSON.themeSettings) {
if (configJSON.themeVariables) {
// Add theme variables
function fetchVariableNameValuePairs(object) {
return Object.entries(object).flatMap(([name, value]) => {
Expand All @@ -91,7 +91,7 @@ module.exports = function(grunt) {
return fetchVariableNameValuePairs(value);
});
}
const variableNameValuePairs = fetchVariableNameValuePairs(configJSON.themeSettings);
const variableNameValuePairs = fetchVariableNameValuePairs(configJSON.themeVariables);
// Add less variables
imports += variableNameValuePairs.map(([name, value]) => `\n@${name}: ${value};`).join('');
// Add css variables
Expand Down
2 changes: 1 addition & 1 deletion src/course/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"build": {
"strictMode": true
},
"themeSettings": {
"themeVariables": {
"_global": {
"font-color": "",
"font-color-inverted": "",
Expand Down

0 comments on commit 67af278

Please sign in to comment.