Bug 1414786: Do not match caption's labels with child combinators. r?dao
Nested captions are not used, nor nested labels inside captions.
Another approach would be to just move all our captions that currently use
<caption><label> to use <caption label="">, and get rid of the <xbl:children>
element.
Let me know if that's preferred, but seems not necessary to me.
MozReview-Commit-ID: Gx7vB0tio5O
--- a/browser/themes/linux/preferences/in-content/dialog.css
+++ b/browser/themes/linux/preferences/in-content/dialog.css
@@ -3,17 +3,17 @@
- You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../../shared/incontentprefs/dialog.inc.css
label:not(.menu-text),
textbox,
description,
.tab-text,
-caption > label {
+caption label {
font-size: 1.11rem;
}
/* Create a separate rule to unset these styles on .tree-input instead of
using :not(.tree-input) so the selector specifity doesn't change. */
textbox.tree-input {
font-size: unset;
}
--- a/browser/themes/linux/preferences/in-content/preferences.css
+++ b/browser/themes/linux/preferences/in-content/preferences.css
@@ -5,17 +5,17 @@
%include ../../../shared/incontentprefs/preferences.inc.css
html *,
page *,
window * {
font-size: 1.11rem;
}
-caption > label:not(.dialogTitle) {
+caption label:not(.dialogTitle) {
font-size: 1.27rem;
}
.tip-caption,
.help-label {
font-size: 1rem;
}
--- a/browser/themes/osx/preferences/in-content/dialog.css
+++ b/browser/themes/osx/preferences/in-content/dialog.css
@@ -8,17 +8,17 @@ prefwindow,
.windowDialog {
font: message-box !important;
}
label:not(.menu-text),
textbox,
description,
.tab-text,
-caption > label {
+caption label {
font-size: 1.36rem;
}
/* Create a separate rule to unset these styles on .tree-input instead of
using :not(.tree-input) so the selector specifity doesn't change. */
textbox.tree-input {
font-size: unset;
}
--- a/browser/themes/osx/preferences/in-content/preferences.css
+++ b/browser/themes/osx/preferences/in-content/preferences.css
@@ -5,17 +5,17 @@
%include ../../../shared/incontentprefs/preferences.inc.css
html *,
page *,
window * {
font-size: 1.36rem;
}
-caption > label:not(.dialogTitle) {
+caption label:not(.dialogTitle) {
font-size: 1.55rem;
}
.tip-caption,
.help-label {
font-size: 1.18rem;
}
--- a/browser/themes/windows/preferences/in-content/dialog.css
+++ b/browser/themes/windows/preferences/in-content/dialog.css
@@ -3,17 +3,17 @@
- You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../../shared/incontentprefs/dialog.inc.css
label:not(.menu-text),
textbox,
description,
.tab-text,
-caption > label {
+caption label {
font-size: 1.25rem;
}
/* Create a separate rule to unset these styles on .tree-input instead of
using :not(.tree-input) so the selector specifity doesn't change. */
textbox.tree-input {
font-size: unset;
}
--- a/browser/themes/windows/preferences/in-content/preferences.css
+++ b/browser/themes/windows/preferences/in-content/preferences.css
@@ -5,17 +5,17 @@
%include ../../../shared/incontentprefs/preferences.inc.css
html *,
page *,
window * {
font-size: 1.25rem;
}
-caption > label:not(.dialogTitle) {
+caption label:not(.dialogTitle) {
font-size: 1.42rem;
}
.tip-caption,
.help-label {
font-size: 1.08rem;
}
--- a/toolkit/themes/shared/in-content/common.inc.css
+++ b/toolkit/themes/shared/in-content/common.inc.css
@@ -72,24 +72,24 @@ html|hr {
}
xul|caption {
-moz-appearance: none;
margin: 0;
}
html|h2,
-xul|caption > xul|checkbox,
-xul|caption > xul|label {
+xul|caption xul|checkbox,
+xul|caption xul|label {
font-weight: 600;
line-height: 22px;
}
-xul|caption > xul|checkbox,
-xul|caption > xul|label {
+xul|caption xul|checkbox,
+xul|caption xul|label {
margin: 0 !important;
}
*|*.main-content {
padding: 40px 28px;
overflow: auto;
}