Skip to content

Commit

Permalink
tools: check-theme: consider background-color too (#3449)
Browse files Browse the repository at this point in the history
* tools: check-theme: consider `background-color` too

This is the precise property we want to check.
  • Loading branch information
felipec committed Jan 1, 2022
1 parent 2e344f5 commit 0e3735a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/checkTheme.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 0e3735a

Please sign in to comment.