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 {
66 background : yellow;
77}
88/**** 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 () {
4343 let cssArray = document . styleSheets [ 0 ] . cssRules ;
4444 let orangeHoverSelector = "" ;
4545 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" ) {
4748 orangeHoverSelector = cssArray [ i ] . style . background || cssArray [ i ] . style [ "background-color" ] ;
4849 }
4950 }
You can’t perform that action at this time.
0 commit comments