Skip to content

Commit

Permalink
tools: check-theme: consider background-color too
Browse files Browse the repository at this point in the history
This is the precise property we want to check.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information
felipec committed Jan 1, 2022
1 parent 2e344f5 commit 0b22463
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 0b22463

Please sign in to comment.