From 959ffad99a57f5f8f0554fed0983317577ae8290 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 3 Jul 2024 20:24:19 +0200 Subject: 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 Co-authored-by: Oriol Brufau --- resources/servo.css | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'resources/servo.css') 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; -- cgit v1.2.3