Bug 1338158: use 'unset' value more in UA stylesheets, in cases where we're already just resetting the property. r=dholbert
authorYatri <yatripatel.169@gmail.com>
Sat, 22 Sep 2018 11:46:06 -0700
changeset 437831 e0409191447598c31c52a4d4296a897413693dbb
parent 437830 42f0da322d14090133d4428764dd38125ec5016c
child 437832 b42bb6bb0be8723d0dd2b3c857c554cefa763062
push id34701
push usernerli@mozilla.com
push dateSun, 23 Sep 2018 21:31:13 +0000
treeherdermozilla-central@b42bb6bb0be8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1338158
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1338158: use 'unset' value more in UA stylesheets, in cases where we're already just resetting the property. r=dholbert
layout/style/res/forms.css
layout/style/res/html.css
layout/style/res/quirk.css
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -269,17 +269,17 @@ select[size][multiple] {
 }
 
 select[size="0"],
 select[size="1"] {
   /* Except this is not a listbox */
   background-color: -moz-Combobox;
   color: -moz-ComboboxText;
   vertical-align: baseline;
-  padding: 0;
+  padding: unset;
   -moz-appearance: menulist;
 }
 
 select > button {
   inline-size: 12px;
   white-space: nowrap;
   position: static !important;
   background-image: url("arrow.gif") !important;
@@ -326,19 +326,19 @@ select:empty {
 *|*::-moz-display-comboboxcontrol-frame {
   overflow: -moz-hidden-unscrollable;
   /* This block-start/end padding plus the combobox block-start/end border need to
      add up to the block-start/end borderpadding of text inputs and buttons */
   padding-block-start: 1px;
   padding-block-end: 1px;
   padding-inline-start: 4px;
   padding-inline-end: 0;
-  color: inherit;
+  color: unset;
   white-space: nowrap;
-  text-align: inherit;
+  text-align: unset;
   -moz-user-select: none;
   /* Make sure to size correctly if the combobox has a non-auto block-size. */
   block-size: 100% ! important;
   box-sizing: border-box ! important;
   line-height: -moz-block-height;
 }
 
 option {
@@ -375,17 +375,17 @@ select:focus > optgroup > option:checked
 optgroup {
   display: block;
   float: none !important;
   position: static !important;
   font: -moz-list;
   line-height: normal !important;
   font-style: italic;
   font-weight: bold;
-  font-size: inherit;
+  font-size: unset;
   -moz-user-select: none;
   text-indent: 0;
   white-space: nowrap !important;
   word-wrap: normal !important;
 }
 
 optgroup > option {
   padding-inline-start: 20px;
@@ -427,101 +427,101 @@ input:disabled,
 textarea:disabled,
 option:disabled,
 optgroup:disabled,
 select:disabled:disabled /* Need the pseudo-class twice to have the specificity
                             be at least the same as select[size][multiple] above */
 {
   color: GrayText;
   background-color: ThreeDLightShadow;
-  cursor: inherit;
+  cursor: unset;
 }
 
 input:disabled,
 textarea:disabled {
   cursor: default;
 }
 
 option:disabled,
 optgroup:disabled {
   background-color: transparent;
 }
 
 /* hidden inputs */
 input[type="hidden"] {
   -moz-appearance: none;
   display: none !important;
-  padding: 0;
+  padding: unset;
   border: 0;
   cursor: auto;
   -moz-user-focus: ignore;
   -moz-binding: none;
 }
 
 /* image buttons */
 input[type="image"] {
   -moz-appearance: none;
-  padding: 0;
+  padding: unset;
   border: none;
   background-color: transparent;
   font-family: sans-serif;
   font-size: small;
   cursor: pointer;
   -moz-binding: none;
 }
 
 input[type="image"]:disabled {
-  cursor: inherit;
+  cursor: unset;
 }
 
 input[type="image"]:-moz-focusring {
   /* Don't specify the outline-color, we should always use initial value. */
   outline: 1px dotted;
 }
 
 /* file selector */
 input[type="file"] {
   display: inline-block;
   white-space: nowrap;
   overflow: hidden;
   overflow-clip-box: padding-box;
-  color: inherit;
+  color: unset;
 
   /* Revert rules which apply on all inputs. */
   -moz-appearance: none;
   -moz-binding: none;
   cursor: default;
 
   border: none;
   background-color: transparent;
-  padding: 0;
+  padding: unset;
 }
 
 input[type="file"] > xul|label {
   min-inline-size: 12em;
   padding-inline-start: 5px;
   text-align: match-parent;
 
-  color: inherit;
-  font-size: inherit;
-  letter-spacing: inherit;
+  color: unset;
+  font-size: unset;
+  letter-spacing: unset;
 
   /*
    * Force the text to have LTR directionality. Otherwise filenames containing
    * RTL characters will be reordered with chaotic results.
    */
   direction: ltr !important;
 }
 
 /* button part of file selector */
 input[type="file"] > button[type="button"] {
   block-size: inherit;
-  font-size: inherit;
-  letter-spacing: inherit;
-  cursor: inherit;
+  font-size: unset;
+  letter-spacing: unset;
+  cursor: unset;
 }
 
 /* colored part of the color selector button */
 input[type="color"]::-moz-color-swatch {
   width: 100%;
   height: 100%;
   min-width: 3px;
   min-height: 3px;
@@ -577,17 +577,17 @@ input[type="checkbox"] {
 input[type="radio"]:disabled,
 input[type="radio"]:disabled:active,
 input[type="radio"]:disabled:hover,
 input[type="radio"]:disabled:hover:active,
 input[type="checkbox"]:disabled,
 input[type="checkbox"]:disabled:active,
 input[type="checkbox"]:disabled:hover,
 input[type="checkbox"]:disabled:hover:active {
-  cursor: inherit;
+  cursor: unset;
 }
 
 % On Mac, the native theme takes care of this.
 % See nsNativeThemeCocoa::ThemeDrawsFocusForWidget.
 %ifndef XP_MACOSX
 input[type="checkbox"]:-moz-focusring,
 input[type="radio"]:-moz-focusring {
   /* Don't specify the outline-color, we should always use initial value. */
@@ -644,17 +644,17 @@ input[type="submit"] {
 
 input[type="color"] {
   inline-size: 64px;
   block-size: 23px;
 }
 
 button {
   /* Buttons should lay out like "normal" html, mostly */
-  white-space: inherit;
+  white-space: unset;
   text-indent: 0;
   /* But no text-decoration reaching inside, by default */
   display: inline-block;
 }
 
 *|*::-moz-button-content {
   display: block;
   /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
@@ -762,17 +762,17 @@ input[type="submit"]:disabled:active,
 input[type="submit"]:disabled {
   /* The sum of border and padding on block-start and block-end
      must be the same here and for text inputs */
   padding-block-start: 0px;
   padding-inline-end: 8px;
   padding-block-end: 0px;
   padding-inline-start: 8px;
   border: 2px outset ThreeDLightShadow;
-  cursor: inherit;
+  cursor: unset;
 }
 
 button:disabled:active, button:disabled,
 input[type="reset"]:disabled:active,
 input[type="reset"]:disabled,
 input[type="button"]:disabled:active,
 input[type="button"]:disabled,
 select:disabled > button,
@@ -1053,22 +1053,22 @@ input[type=number]::-moz-number-text {
   /* work around autofocus bug 939248 on initial load */
   -moz-user-modify: read-write;
   /* This pseudo-element is also an 'input' element (nested inside and
    * distinct from the <input type=number> element) so we need to prevent the
    * explicit setting of 'text-align' by the general CSS rule for 'input'
    * above. We want to inherit its value from its <input type=number>
    * ancestor, not have that general CSS rule reset it.
    */
-  text-align: inherit;
+  text-align: unset;
   text-decoration: inherit;
   ime-mode: inherit;
   flex: 1;
   min-inline-size: 0;
-  padding: 0;
+  padding: unset;
   border: 0;
   margin: 0;
 }
 
 input[type=number]::-moz-number-spin-box {
   writing-mode: horizontal-tb;
   display: flex;
   flex-direction: column;
--- a/layout/style/res/html.css
+++ b/layout/style/res/html.css
@@ -467,17 +467,17 @@ tfoot {
 /* for XHTML tables without tbody */
 table > tr {
   vertical-align: middle;
 }
 
 td { 
   display: table-cell;
   vertical-align: inherit;
-  text-align: inherit; 
+  text-align: unset; 
   padding: 1px;
 }
 
 th {
   display: table-cell;
   vertical-align: inherit;
   font-weight: bold;
   padding: 1px;
@@ -724,17 +724,17 @@ noembed, param, template {
 area {
   /* Don't give it frames other than its imageframe */
   display: none ! important;
 }
 
 iframe:fullscreen {
   /* iframes in full-screen mode don't show a border. */
   border: none !important;
-  padding: 0 !important;
+  padding: unset !important;
 }
 
 /* media elements */
 video > xul|videocontrols, audio > xul|videocontrols {
   display: -moz-box;
   -moz-box-orient: vertical;
   -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#videoControls");
 }
@@ -894,17 +894,17 @@ rtc, rt {
 rtc:lang(zh), rt:lang(zh) {
   ruby-align: center;
 }
 rtc:lang(zh-TW), rt:lang(zh-TW) {
   font-size: 30%; /* bopomofo */
   -moz-min-font-size-ratio: 30%;
 }
 rtc > rt {
-  font-size: inherit;
+  font-size: unset;
 }
 ruby, rb, rt, rtc {
   unicode-bidi: isolate;
 }
 
 /* Shadow DOM v1
  * https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree */
 slot {
--- a/layout/style/res/quirk.css
+++ b/layout/style/res/quirk.css
@@ -17,17 +17,17 @@ li ul, li ol, li dir, li menu {
   list-style-position: outside;
 }
 
 /* undo previous two rules for properly nested lists */
   ul ul,   ul ol,   ul dir,   ul menu,   ul li,
   ol ul,   ol ol,   ol dir,   ol menu,   ol li,
  dir ul,  dir ol,  dir dir,  dir menu,  dir li,
 menu ul, menu ol, menu dir, menu menu, menu li {
-  list-style-position: inherit;
+  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) */