diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-07-03 20:24:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 18:24:19 +0000 |
commit | 959ffad99a57f5f8f0554fed0983317577ae8290 (patch) | |
tree | b39a61902cdb8d2bf648b27469ea69dbdcb5aed4 /resources | |
parent | f8e4ae60401358ac6adaa480e63c587f9f8293a2 (diff) | |
download | servo-959ffad99a57f5f8f0554fed0983317577ae8290.tar.gz servo-959ffad99a57f5f8f0554fed0983317577ae8290.zip |
layout: Add support for table captions (#32657)
This adds initial support for table captions. To do this, the idea of
the table wrapper becomes a bit more concrete. Even so, the wrapper is
still reponsible for allocating space for the grid's border and padding,
as those properties are specified on the wrapper and not grid in CSS.
In order to account for this weirdness of HTML/CSS captions and grid are
now laid out and placed with a negative offset in the table wrapper
content rect.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/servo.css | 35 | ||||
-rw-r--r-- | resources/user-agent.css | 5 |
2 files changed, 39 insertions, 1 deletions
diff --git a/resources/servo.css b/resources/servo.css index e3d21e69665..372d8afcf9d 100644 --- a/resources/servo.css +++ b/resources/servo.css @@ -231,6 +231,41 @@ svg > * { display: table-cell; } +*|*::-servo-table-grid { + all: inherit; + margin: unset; + float: unset; + clear: unset; + position: unset; + z-index: unset; + page-break-before: unset; + page-break-after: unset; + page-break-inside: unset; + vertical-align: unset; + line-height: unset; + transform: unset; + transform-origin: unset; + backface-visibility: unset; + clip: unset; + transform-style: unset; + rotate: unset; + scale: unset; + translate: unset; + align-self: unset; + justify-self: unset; + grid-column-start: unset; + grid-column-end: unset; + grid-row-start: unset; + grid-row-end: unset; + order: unset; + outline: unset; + outline-offset: unset; + column-span: unset; + contain: unset; + container: unset; + scroll-margin: unset; +} + *|*::-servo-legacy-anonymous-block { display: block; position: static; diff --git a/resources/user-agent.css b/resources/user-agent.css index 923eeed7099..e7acd5fdf2c 100644 --- a/resources/user-agent.css +++ b/resources/user-agent.css @@ -204,7 +204,10 @@ dir, menu, ul { list-style-type: disc; } table { display: table; } -caption { display: table-caption; } +caption { + display: table-caption; + text-align: center; +} colgroup, colgroup[hidden] { display: table-column-group; } col, col[hidden] { display: table-column; } thead, thead[hidden] { display: table-header-group; } |