From 0b22463e567599c4a68f1a9479c327abe41af20d Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Thu, 30 Dec 2021 19:13:29 -0600 Subject: [PATCH 1/2] tools: check-theme: consider background-color too This is the precise property we want to check. Signed-off-by: Felipe Contreras --- tools/checkTheme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/checkTheme.js b/tools/checkTheme.js index bd2587e6d0..c5ea32370c 100755 --- a/tools/checkTheme.js +++ b/tools/checkTheme.js @@ -193,7 +193,10 @@ class CSSRule { constructor(rule, body) { this.rule = rule; if (rule.declarations) { - this.bg = rule.declarations.find(x => x.property =="background")?.value; + this.bg = rule.declarations.find(x => x.property =="background-color")?.value; + if (!this.bg) { + this.bg = rule.declarations.find(x => x.property =="background")?.value; + } this.fg = rule.declarations.find(x => x.property =="color")?.value; if (this.bg) { From 592f8f372b7e3035db82a9a7097e607fc265d007 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sat, 1 Jan 2022 18:16:44 -0500 Subject: [PATCH 2/2] Update tools/checkTheme.js --- tools/checkTheme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/checkTheme.js b/tools/checkTheme.js index c5ea32370c..45ae7d9157 100755 --- a/tools/checkTheme.js +++ b/tools/checkTheme.js @@ -193,9 +193,9 @@ class CSSRule { constructor(rule, body) { this.rule = rule; if (rule.declarations) { - this.bg = rule.declarations.find(x => x.property =="background-color")?.value; + this.bg = rule.declarations.find(x => x.property == "background-color")?.value; if (!this.bg) { - this.bg = rule.declarations.find(x => x.property =="background")?.value; + this.bg = rule.declarations.find(x => x.property == "background")?.value; } this.fg = rule.declarations.find(x => x.property =="color")?.value;