scroll-snap-root-003.html (847B)
1 <!DOCTYPE html> 2 <html> 3 <title>scroll-snap-type does not propagate body to viewport</title> 4 <link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> 5 <link rel='help' href='https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-type'> 6 <link rel='help' href='https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding'> 7 <link rel='match' href='no-red-ref.html'> 8 <meta name='assert' 9 content="Test passes if scroll-snap-type on body is not applied to viewport."> 10 11 <style type='text/css'> 12 :root { 13 overflow: hidden; /* hide scrollbars for reftest analysis */ 14 } 15 16 body { 17 scroll-snap-type: block mandatory; 18 } 19 20 #pass { 21 height: 120vh; 22 } 23 24 #target { 25 scroll-snap-align: start; 26 height: 100vh; 27 background: red; 28 } 29 </style> 30 31 <p id="pass">Test passes if there is no red. 32 33 <div id="target"> 34 <div>FAIL</div> 35 </div>