File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ li + #thirditem {
6
6
background : yellow;
7
7
}
8
8
/**** DO NOT EDIT ANYTHING ABOVE THIS LINE ****/
9
+
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ describe("All the styles should be applied", function () {
43
43
let cssArray = document . styleSheets [ 0 ] . cssRules ;
44
44
let orangeHoverSelector = "" ;
45
45
for ( let i = 0 ; i < cssArray . length ; i ++ ) {
46
- if ( cssArray [ i ] . selectorText === "#thirditem" && cssArray [ i ] . style . _importants . background === "important" || cssArray [ i ] . style . _importants [ "background-color" ] === "important" ) {
46
+ // here is the problem, the only selector acepted is #thirditem so if you read li + #thirditem or li #thirditem or li + #thirditem is not acepted
47
+ if ( cssArray [ i ] . selectorText . endsWith ( "#thirditem" ) && cssArray [ i ] . style . _importants . background === "important" || cssArray [ i ] . style . _importants [ "background-color" ] === "important" ) {
47
48
orangeHoverSelector = cssArray [ i ] . style . background || cssArray [ i ] . style [ "background-color" ] ;
48
49
}
49
50
}
You can’t perform that action at this time.
0 commit comments