Skip to content

[css-position][css-tables] Need to define relative positioning on table cells, rows and row groups in collapsing border model #11515

Open
@Loirooriol

Description

https://drafts.csswg.org/css-position/#relpos-insets
https://drafts.csswg.org/css-tables/#border-collapsing

<!DOCTYPE html>
<style>td { border: 10px solid rgba(0, 0, 0, 0.5); background: cyan }</style>
<table style="border-collapse: collapse">
  <td>A</td><td>B</td>
</table>
<table style="border-collapse: collapse">
  <td>A</td><td style="position: relative; left: 0">B</td>
</table>
<table style="border-collapse: collapse">
  <td>A</td><td style="position: relative; left: 50px">B</td>
</table>
<table style="border-collapse: collapse">
  <tr style="position: relative; left: 50px">
    <td>A</td><td>B</td>
  </tr>
</table>
<table style="border-collapse: collapse">
  <tbody style="position: relative; left: 50px">
    <td>A</td><td>B</td>
  </tbody>
</table>
Gecko Blink WebKit

It's surprising to say at least that adding position: relative on a cell shrinks the background area...

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions