Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e3735a

Browse files
authored
tools: check-theme: consider background-color too (#3449)
* tools: check-theme: consider `background-color` too This is the precise property we want to check.
1 parent 2e344f5 commit 0e3735a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/checkTheme.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ class CSSRule {
193193
constructor(rule, body) {
194194
this.rule = rule;
195195
if (rule.declarations) {
196-
this.bg = rule.declarations.find(x => x.property =="background")?.value;
196+
this.bg = rule.declarations.find(x => x.property == "background-color")?.value;
197+
if (!this.bg) {
198+
this.bg = rule.declarations.find(x => x.property == "background")?.value;
199+
}
197200
this.fg = rule.declarations.find(x => x.property =="color")?.value;
198201

199202
if (this.bg) {

0 commit comments

Comments
 (0)