Given the block container with { padding: 20px; padding-bottom: 0; } and inner block elements with { margin-bottom: 30px; }. For some reason the last element's margin is not counted when calculationg container block's height. Why does it happen? Adding border to container element, or changing padding-bottom to 1px fixes the problem. But, again, why? There's such thing like margin collapse, but I've never heard of padding-margin collapse.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
</head>
<style>
.container {
padding: 20px;
padding-bottom: 0;
}
.content {
margin-bottom: 30px;
}
</style>
<body>
<div class="container">
<div class="content">1</div>
<div class="content">2</div>
<div class="content">3</div>
</div>
</body>
</html>