object-view-box-contain-intrinsic-size.html (749B)
1 <!DOCTYPE html> 2 <html> 3 <title>CSS object-view-box on an element with contain-intrinsic-size</title> 4 <link rel="author" href="mailto:khushalsagar@chromium.org"> 5 <link rel="match" href="object-view-box-contain-intrinsic-size-ref.html"> 6 <link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> 7 8 <style> 9 .default { 10 /* Paint the yellow box at the bottom right corner. The box should be sized 11 based on |contain-intrinsic-size| but the painted content is based on the 12 view box. */ 13 object-view-box: inset(50px 0px 0px 25px); 14 object-fit: fill; 15 contain: size; 16 contain-intrinsic-size: 50px 100px; 17 clip-path: inset(1px 0px 0px 1px); 18 } 19 </style> 20 <img class="default" src="support/exif-orientation-6-ru.jpg"></img>