Skip to content

Commit

Permalink
(renderItems): Add capacity for extra_css in settings.yml
Browse files Browse the repository at this point in the history
This flag in the global section of settings.yml allows landscapes
to have custom CSS properties set.

Signed-off-by: Milan Lakhani <[email protected]>
  • Loading branch information
milanlakhani authored and Milan Lakhani committed Nov 14, 2022
1 parent a49ff4b commit 9df43a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/renderItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function main() {
const js = await fs.readFile('src/script.js', 'utf-8');
const css = await fs.readFile('src/style.css', 'utf-8');
// preprocess css media queries
let processedCss = css;
let processedCss = css.concat("\n\n"+settings.global.extra_css || "");
const match = css.match(/(--\w+-screen:\s\d+px)/g);
for(let cssVar of match) {
const value = cssVar.match(/(\d+px)/)[0];
Expand Down

0 comments on commit 9df43a8

Please sign in to comment.