mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Previously, horizontal padding, border, and margin were not being resolved for table captions. This was visible in layout tests where captions with padding showed 0 in the width metrics.
22 lines
417 B
HTML
22 lines
417 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.table {
|
|
display: table;
|
|
border: 2px solid black;
|
|
}
|
|
|
|
.caption {
|
|
display: table-caption;
|
|
caption-side: bottom;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
}
|
|
</style>
|
|
<div class="table">
|
|
<img src="../400.png" width="100" height="100">
|
|
<div class="caption">Caption text constrained to table width</div>
|
|
</div>
|