File tree Expand file tree Collapse file tree 3 files changed +122
-0
lines changed Expand file tree Collapse file tree 3 files changed +122
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+ < title > CSS Test Reference (Color): ending of opacity animation</ title >
4+ < link rel ="author " title ="L. David Baron " href ="https://dbaron.org/ ">
5+ < link rel ="author " title ="Google " href ="https://www.google.com/ ">
6+
7+ < style >
8+ # test {
9+ position : sticky;
10+ top : 0 ;
11+ height : 50px ;
12+ background : blue;
13+ opacity : 0.2 ;
14+ }
15+
16+ .tall {
17+ height : 5000px ;
18+ }
19+ </ style >
20+
21+ < div id ="test ">
22+ </ div >
23+ < div class ="tall ">
24+ </ div >
Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html class ="reftest-wait ">
3+ < title > CSS Test (Color): ending of opacity animation</ title >
4+ < link rel ="author " title ="L. David Baron " href ="https://dbaron.org/ ">
5+ < link rel ="author " title ="Google " href ="https://www.google.com/ ">
6+ < link rel ="help " href ="https://bugs.chromium.org/p/chromium/issues/detail?id=1330438 ">
7+ < link rel ="help " href ="https://www.w3.org/TR/css-color-3/#transparency ">
8+ < link rel ="match " href ="opacity-animation-ending-correctly-001-ref.html ">
9+
10+ < style >
11+ # test {
12+ position : sticky;
13+ top : 0 ;
14+ height : 50px ;
15+ background : blue;
16+ transition : opacity 50ms step-start;
17+ }
18+
19+ # test .fade {
20+ opacity : 0.2 ;
21+ }
22+
23+ .tall {
24+ height : 5000px ;
25+ }
26+ </ style >
27+
28+ < div id ="test ">
29+ </ div >
30+ < div class ="tall ">
31+ </ div >
32+
33+ < script >
34+ function flushStyleLayoutAndPrePaint ( ) {
35+ document . elementFromPoint ( 10 , 10 ) ;
36+ }
37+
38+ document . getElementById ( "test" ) . addEventListener ( "transitionend" , function ( e ) {
39+ document . documentElement . classList . remove ( "reftest-wait" ) ;
40+ } ) ;
41+ requestAnimationFrame ( function ( ) {
42+ flushStyleLayoutAndPrePaint ( ) ;
43+ requestAnimationFrame ( function ( ) {
44+ document . getElementById ( "test" ) . classList . add ( "fade" ) ;
45+ flushStyleLayoutAndPrePaint ( ) ;
46+ } ) ;
47+ } ) ;
48+ </ script >
Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html class ="reftest-wait ">
3+ < title > CSS Test (Color): ending of opacity animation</ title >
4+ < link rel ="author " title ="L. David Baron " href ="https://dbaron.org/ ">
5+ < link rel ="author " title ="Google " href ="https://www.google.com/ ">
6+ < link rel ="help " href ="https://bugs.chromium.org/p/chromium/issues/detail?id=1330438 ">
7+ < link rel ="help " href ="https://www.w3.org/TR/css-color-3/#transparency ">
8+ < link rel ="match " href ="opacity-animation-ending-correctly-001-ref.html ">
9+
10+ < style >
11+ # test {
12+ position : sticky;
13+ top : 0 ;
14+ height : 50px ;
15+ background : blue;
16+ transform : translate (0 );
17+ filter : grayscale (0% );
18+ transition : opacity 50ms step-start;
19+ }
20+
21+ # test .fade {
22+ opacity : 0.2 ;
23+ }
24+
25+ .tall {
26+ height : 5000px ;
27+ }
28+ </ style >
29+
30+ < div id ="test ">
31+ </ div >
32+ < div class ="tall ">
33+ </ div >
34+
35+ < script >
36+ function flushStyleLayoutAndPrePaint ( ) {
37+ document . elementFromPoint ( 10 , 10 ) ;
38+ }
39+
40+ document . getElementById ( "test" ) . addEventListener ( "transitionend" , function ( e ) {
41+ document . documentElement . classList . remove ( "reftest-wait" ) ;
42+ } ) ;
43+ requestAnimationFrame ( function ( ) {
44+ flushStyleLayoutAndPrePaint ( ) ;
45+ requestAnimationFrame ( function ( ) {
46+ document . getElementById ( "test" ) . classList . add ( "fade" ) ;
47+ flushStyleLayoutAndPrePaint ( ) ;
48+ } ) ;
49+ } ) ;
50+ </ script >
You can’t perform that action at this time.
0 commit comments