File tree Expand file tree Collapse file tree
test/web-platform-tests/to-upstream/css/cssom Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55< script src ="/resources/testharness.js "> </ script >
66< script src ="/resources/testharnessreport.js "> </ script >
77<!-- Regression test for https://github.com/jsdom/jsdom/issues/2485 -->
8+ <!-- Regression test for https://github.com/jsdom/jsdom/issues/3532 -->
89
910< style >
1011 # testElement { display : none !important ; }
1112</ style >
12-
13+ < style >
14+ # testElement2 { display : none !important ; }
15+ </ style >
16+ < style >
17+ # testElement2 { display : inline-block; }
18+ </ style >
1319< div id ="testElement " style ="display: block; "> </ div >
20+ < div id ="testElement2 "> </ div >
1421
1522< script >
1623"use strict" ;
2027 const style = window . getComputedStyle ( element ) ;
2128 assert_equals ( style . display , "none" ) ;
2229} , "getComputedStyle should return !important stylesheet value over inline style" ) ;
30+
31+ test ( ( ) => {
32+ const element = document . getElementById ( "testElement2" ) ;
33+ const style = window . getComputedStyle ( element ) ;
34+ assert_equals ( style . display , "none" ) ;
35+ } , "getComputedStyle should return !important stylesheet value rather than the subsequent stylesheet value" ) ;
2336</ script >
You can’t perform that action at this time.
0 commit comments