Bug 1414786: Do not match caption's labels with child combinators. r?dao draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 06 Nov 2017 13:41:34 +0100
changeset 693534 36f5b8fa6205031ba8cd1a5ea4f45dbb6dbf034c
parent 693519 dc45ee24c55d1061951956321bd8481d517ce22a
child 739066 0b42dbab9fa78c0c0795ef94b27af9bc7fea3f10
push id87840
push userbmo:emilio@crisal.io
push dateMon, 06 Nov 2017 12:45:06 +0000
reviewersdao
bugs1414786
milestone58.0a1
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
browser/themes/linux/preferences/in-content/dialog.css
browser/themes/linux/preferences/in-content/preferences.css
browser/themes/osx/preferences/in-content/dialog.css
browser/themes/osx/preferences/in-content/preferences.css
browser/themes/windows/preferences/in-content/dialog.css
browser/themes/windows/preferences/in-content/preferences.css
toolkit/themes/shared/in-content/common.inc.css
--- 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;
 }