From e4fd04204144b9ac40dc4791aab5562066e3f349 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 20 Sep 2022 10:58:58 +0200 Subject: [PATCH] LibWeb: Flesh out the default "quirks mode" style sheet Import all the quirks mode rules from the HTML spec. There's more to quirks mode, of course, but it's nice that we can just copy these. --- Userland/Libraries/LibWeb/CSS/QuirksMode.css | 42 +++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/QuirksMode.css b/Userland/Libraries/LibWeb/CSS/QuirksMode.css index 8e1aeb392b..ab19bd4444 100644 --- a/Userland/Libraries/LibWeb/CSS/QuirksMode.css +++ b/Userland/Libraries/LibWeb/CSS/QuirksMode.css @@ -1,3 +1,41 @@ -table { - text-align: left; +/* 15.3.3 Flow content + * https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 + */ + +form { + margin-bottom: 1em; +} + +/* 15.3.8 Tables + * https://html.spec.whatwg.org/multipage/rendering.html#tables-2 + */ + +table { + font-weight: initial; + font-style: initial; + font-variant: initial; + font-size: initial; + line-height: initial; + white-space: initial; + text-align: initial; +} + +/* 15.3.10 Form controls + * https://html.spec.whatwg.org/multipage/rendering.html#form-controls + */ + +input:not([type=image i]), textarea { + box-sizing: border-box; +} + +/* 15.4.2 Images + * https://html.spec.whatwg.org/multipage/rendering.html#images-3 + */ + +img[align=left i] { + margin-right: 3px; +} + +img[align=right i] { + margin-left: 3px; }