summaryrefslogtreecommitdiffstats
path: root/layout/style/res/quirk.css
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/style/res/quirk.css
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/style/res/quirk.css')
-rw-r--r--layout/style/res/quirk.css105
1 files changed, 105 insertions, 0 deletions
diff --git a/layout/style/res/quirk.css b/layout/style/res/quirk.css
new file mode 100644
index 0000000000..6e74839ee3
--- /dev/null
+++ b/layout/style/res/quirk.css
@@ -0,0 +1,105 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
+
+
+/* Quirk: make orphaned LIs have inside bullet (b=1049) */
+
+/* force inside position for orphaned lis */
+li {
+ list-style-position: inside;
+}
+
+/* restore outside position for lists inside LIs */
+li :is(ul, ol, dir, menu) {
+ list-style-position: outside;
+}
+
+/* undo previous two rules for properly nested lists */
+:is(ul, ol, dir, menu) :is(ul, ol, dir, menu, li) {
+ list-style-position: unset;
+}
+
+
+/* Quirk: ensure that we get proper padding if the very first
+ * node in an LI is another UL or OL. This is an ugly way to
+ * fix the problem, because it extends the LI up into what
+ * would otherwise appear to be the ULs space. (b=38832) */
+
+/* Note: this fix will fail once we implement marker box
+ * alignment correctly. */
+li > ul:-moz-first-node,
+li > ol:-moz-first-node {
+ padding-block-start: 1em;
+}
+
+
+table {
+ text-align: start;
+ white-space: normal; /* compatible with IE & spec */
+ line-height: normal;
+
+ /* Quirk: cut off all font inheritance in tables except for family. */
+ font-size: initial;
+ font-weight: initial;
+ font-style: initial;
+ font-variant: initial;
+}
+
+
+/* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
+
+/*
+ * While it may seem simpler to use :-moz-first-node and :-moz-last-node without
+ * tags, it's slower, since we have to do the :-moz-first-node or :-moz-last-node
+ * check on every single element in the document. If we list all the
+ * element names for which the UA stylesheet specifies a margin, the
+ * selectors will be hashed in the selector maps and things will be much more
+ * efficient.
+ */
+:is(body, td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-first-node {
+ margin-block-start: 0;
+}
+
+td > p:-moz-last-node, th > p:-moz-last-node {
+ margin-block-end: 0;
+}
+
+/* Similar as above, but for empty elements
+ * collapse the bottom or top margins of empty elements
+ * - see bug 97361
+ */
+:is(body, td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-only-whitespace:-moz-first-node {
+ margin-block-end: 0;
+}
+
+:is(td, th) > :is(p, dl, multicol, blockquote, h1, h2, h3, h4, h5, h6, listing, plaintext, xmp, pre, ul, menu, dir, ol):-moz-only-whitespace:-moz-last-node {
+ margin-block-start: 0;
+}
+
+/* Quirk: Make floated images have a margin (b=58899) */
+img[align=left] {
+ margin-right: 3px;
+}
+
+img[align=right] {
+ margin-left: 3px;
+}
+
+/*
+ * Quirk: Use border-box box sizing for text inputs, password inputs, and
+ * textareas. (b=184478 on why we use content-box sizing in standards mode)
+ */
+
+/* Note that all other <input>s already use border-box
+ sizing, so we're ok with this selector */
+input:not([type=image]), textarea {
+ box-sizing: border-box;
+}
+
+/* Quirk: give form margin for compat (b=41806) */
+form {
+ margin-block-end: 1em;
+}