Skip to content

Fixes #962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fixes #962

Show file tree
Hide file tree
Changes from all 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