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

Add capability for custom CSS from user side #839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
(renderItems): Add capacity for extra_css in settings.yml
This flag in the global section of settings.yml allows landscapes
to have custom CSS properties set.

Signed-off-by: Milan Lakhani <mlakhani14@bloomberg.net>
milanlakhani authored and Milan Lakhani committed Nov 15, 2022
commit 20abf5d8e962d98b086c612b7df60598a48480c8
2 changes: 1 addition & 1 deletion tools/renderItems.js
Original file line number Diff line number Diff line change
@@ -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];