Skip to content
Open

Fixes #962

Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rules/complex.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var COMPLEX_SELECTOR_THRESHOLD = 3;
var COMPLEX_SELECTOR_THRESHOLD = 5;

/**
* @param { import("../lib/css-analyzer") } analyzer
Expand Down
2 changes: 1 addition & 1 deletion test/rules/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports.tests = [
{
css: '.foo { border-color: #000 #000000 rgb(0,0,0) rgba(0,0,0,1) }',
metrics: {
colors: 2
colors: 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

}
},
];
6 changes: 6 additions & 0 deletions test/rules/complex.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ exports.tests = [
complexSelectors: 1
}
},
{
css: 'header li.foo { color: red }',
metrics: {
complexSelectors: 0
}
},
{
css: '.someclass:not([ng-show="gcdmShowSystemNotAvailableMessage()"]){display:none}',
metrics: {
Expand Down