Skip to content

Commit

Permalink
Bug 1918451 [wpt PR 48122] - layout: Ensure that <caption> supports…
Browse files Browse the repository at this point in the history
… `position: relative`, a=testonly

Automatic update from web-platform-tests
layout: Ensure that `<caption>`'s support `position: relative`

This change adds support for `position: relative` to table `<caption>`.
In addition to adjusting their position according to inset values, table
captions must also establish containing blocks for descendants that are
absolutely positioned.

Co-authored-by: Oriol Brufau <[email protected]>
Signed-off-by: Martin Robinson <[email protected]>

--

wpt-commits: 7b75c979eda5f24e1e4d74ad0329eb63d72651be
wpt-pr: 48122
  • Loading branch information
mrobinson authored and moz-wptsync-bot committed Sep 25, 2024
1 parent 3656d1e commit b7b185c
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<link rel="author" title="Martin Robinson" href="mailto:[email protected]">
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]">
<title>&lt;caption&gt; elements can be relatively positioned</title>
<meta name="assert" content="The caption is positioned relatively to the table wrapper">
<link rel="help" href="https://drafts.csswg.org/css2/#relative-positioning">
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
<style>
caption {
position: relative;
background: green;
width: 100px;
height: 100px;
margin-left: 200px;
left: -200px;
}
</style>

<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width: 100px; background: red;">
<table>
<caption></caption>
</table>
</div>
</html>

0 comments on commit b7b185c

Please sign in to comment.