Bug 645642: use text-align: match-parent in list items, options and file inputs, r=dbaron
authorSimon Montagu <smontagu@smontagu.org>
Tue, 28 Apr 2015 22:56:22 -0700
changeset 274232 6267c4d1de60680bb07bf9b5e79c93f62c0857c1
parent 274231 956a03448bbe9f217b57dc55c4023e2707189aec
child 274233 ffeb7ddc393f45cadc0d9824818cd9ef8c09953c
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs645642
milestone40.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 645642: use text-align: match-parent in list items, options and file inputs, r=dbaron
layout/style/forms.css
layout/style/html.css
--- a/layout/style/forms.css
+++ b/layout/style/forms.css
@@ -302,16 +302,17 @@ option {
   float: none !important;
   position: static !important;
   min-block-size: 1em;
   line-height: normal !important;
   -moz-user-select: none;
   text-indent: 0;
   white-space: nowrap !important;
   word-wrap: normal !important;
+  text-align: match-parent;
 }
 
 select > option {
   padding-block-start : 0;
   padding-block-end: 0;
   -moz-padding-start: 3px;
   -moz-padding-end: 5px;
 }
@@ -442,16 +443,17 @@ input[type="file"] {
   border: none;
   background-color: transparent;
   padding: 0;
 }
 
 input[type="file"] > xul|label {
   min-inline-size: 12em;
   -moz-padding-start: 5px;
+  text-align: match-parent;
 
   color: inherit;
   font-size: inherit;
   letter-spacing: inherit;
 
   /*
    * Force the text to have LTR directionality. Otherwise filenames containing
    * RTL characters will be reordered with chaotic results.
@@ -476,21 +478,21 @@ input[type="color"]:-moz-system-metric(c
   -moz-margin-start: auto;
   -moz-margin-end: auto;
   box-sizing: border-box;
   border: 1px solid grey;
   display: block;
 }
 
 /* Try to make RTL <input type='file'> look nicer. */
-/* TODO: use text-align: match-parent when bug 645642 is fixed. */
+/* TODO: find a better solution than forcing direction: ltr on all file
+   input labels and remove this override -- bug 1161482 */
 input[type="file"]:-moz-dir(rtl) > xul|label {
   -moz-padding-start: 0px;
   -moz-padding-end: 5px;
-  text-align: right;
 }
 
 /* radio buttons */
 input[type="radio"] {
   -moz-appearance: radio;
   margin-block-start: 3px;
   margin-block-end: 0px;
   -moz-margin-start: 5px;
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -582,16 +582,17 @@ ol {
   list-style-type: decimal;
   margin-block-start: 1em;
   margin-block-end: 1em;
   -moz-padding-start: 40px;
 }
 
 li {
   display: list-item;
+  text-align: match-parent;
 }
 
 /* nested lists have no top/bottom margins */
 :-moz-any(ul, ol, dir, menu, dl) ul,
 :-moz-any(ul, ol, dir, menu, dl) ol,
 :-moz-any(ul, ol, dir, menu, dl) dir,
 :-moz-any(ul, ol, dir, menu, dl) menu,
 :-moz-any(ul, ol, dir, menu, dl) dl {