mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
75a2789586
The containing block's block-size (`blockContentSize.BSize(wm)`) can be unconstrained if the block has `position:relative` at the time we call the `CalculateBorderPaddingMargin()`. That triggers the warning further down in the stack in `ComputeCBDependentValue`. However, the percentage margin and padding should resolve against the containing block's inline-size rather than the block-size. Hence this patch. Differential Revision: https://phabricator.services.mozilla.com/D174340
17 lines
184 B
HTML
17 lines
184 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.rel {
|
|
position: relative;
|
|
}
|
|
|
|
.abs {
|
|
width: 100%;
|
|
position: absolute;
|
|
padding-top: 50%;
|
|
}
|
|
</style>
|
|
|
|
<div class="rel">
|
|
<div class="abs"></div>
|
|
</div>
|