Skip to content

Commit 9c394e7

Browse files
committed
fixed test to accept both background and background-color
1 parent d736538 commit 9c394e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/05-Specificity/tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +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") {
47-
orangeHoverSelector = cssArray[i].style.background;
46+
if (cssArray[i].selectorText === "#thirditem" && cssArray[i].style._importants.background === "important" || cssArray[i].style._importants["background-color"] === "important") {
47+
orangeHoverSelector = cssArray[i].style.background || cssArray[i].style["background-color"];
4848
}
4949
}
5050

0 commit comments

Comments
 (0)