From 0e3735ac62a35b7296b7e92bc39f73d587c738f5 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sat, 1 Jan 2022 17:17:26 -0600 Subject: [PATCH] tools: check-theme: consider background-color too (#3449) * tools: check-theme: consider `background-color` too This is the precise property we want to check. --- tools/checkTheme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/checkTheme.js b/tools/checkTheme.js index bd2587e6d0..45ae7d9157 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) {