<!DOCTYPE html> | |
<style> | |
#container { | |
position: relative; | |
width: 100px; | |
} | |
#dynamic-padding { | |
position: absolute; | |
left: 0; | |
top: 0; | |
width: 280px; | |
height: 280px; | |
padding: 10px; | |
background-clip: content-box; | |
background-color: yellow; | |
} | |
</style> | |
<div id="container"> | |
<div id="dynamic-padding"></div> | |
</div> | |
This test verifies an element with percentage padding and background-clip:content-box correctly repaints when its padding changes due to container layout. |