line-clamp-with-fixed-pos-015.html (1027B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: line-clamp: auto hidden block-level fixed pos</title> 4 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp"> 6 <link rel="match" href="reference/webkit-line-clamp-005-ref.html"> 7 <meta name="assert" content="Block-level fixed-pos should be hidden if its fixed positioning containing block is after the clamp point with line-clamp: auto"> 8 <style> 9 .clamp { 10 line-clamp: auto; 11 max-height: 4lh; 12 font: 16px / 32px serif; 13 padding: 0 4px; 14 background-color: yellow; 15 } 16 .transformed { 17 transform: scale(1); /* Makes it a fixed-pos containing block */ 18 } 19 .fixed { 20 position: fixed; 21 width: 100px; 22 height: 100px; 23 background-color: skyblue; 24 } 25 </style> 26 27 <div class="clamp"> 28 <div>Line 1</div> 29 <div>Line 2</div> 30 <div>Line 3</div> 31 <div>Line 4</div> 32 <div>Line 5</div> 33 <div class="transformed"> 34 <div>Line 6</div> 35 <div class="fixed"></div> 36 </div> 37 </div>