layout/style/forms.css

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/forms.css	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,980 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/** 
     1.9 +  Styles for old GFX form widgets
    1.10 + **/ 
    1.11 + 
    1.12 +
    1.13 +@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
    1.14 +@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    1.15 +
    1.16 +*|*::-moz-fieldset-content {
    1.17 +  display: block;
    1.18 +  unicode-bidi: inherit;
    1.19 +  text-overflow: inherit;
    1.20 +  overflow: inherit;
    1.21 +  padding: inherit;
    1.22 +  height: 100%;   /* Need this so percentage heights of kids work right */
    1.23 +}
    1.24 +
    1.25 +/* miscellaneous form elements */
    1.26 +
    1.27 +fieldset > legend {
    1.28 +  padding-left: 2px;
    1.29 +  padding-right: 2px;
    1.30 +  width: -moz-fit-content;
    1.31 +}
    1.32 +
    1.33 +legend {
    1.34 +  display: block;
    1.35 +}
    1.36 +
    1.37 +fieldset {
    1.38 +  display: block;
    1.39 +  margin-left: 2px;
    1.40 +  margin-right: 2px;
    1.41 +  padding: 0.35em 0.625em 0.75em;
    1.42 +  border: 2px groove ThreeDFace;
    1.43 +}
    1.44 +
    1.45 +label {
    1.46 +  cursor: default;
    1.47 +}
    1.48 +
    1.49 +/* default inputs, text inputs, and selects */
    1.50 +
    1.51 +/* Note: Values in nsNativeTheme IsWidgetStyled function 
    1.52 +   need to match textfield background/border values here */
    1.53 +
    1.54 +input {
    1.55 +  -moz-appearance: textfield;
    1.56 +  /* The sum of border-top, border-bottom, padding-top, padding-bottom
    1.57 +     must be the same here, for buttons, and for <select> (including its
    1.58 +     internal padding magic) */
    1.59 +  padding: 1px;
    1.60 +  border: 2px inset ThreeDFace;
    1.61 +  background-color: -moz-Field;
    1.62 +  color: -moz-FieldText;
    1.63 +  font: -moz-field;
    1.64 +  text-rendering: optimizeLegibility;
    1.65 +  line-height: normal;
    1.66 +  text-align: start;
    1.67 +  text-transform: none;
    1.68 +  word-spacing: normal;
    1.69 +  letter-spacing: normal;
    1.70 +  cursor: text;
    1.71 +  -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#inputFields");
    1.72 +  text-indent: 0;
    1.73 +  -moz-user-select: text;
    1.74 +  text-shadow: none;
    1.75 +  overflow-clip-box: content-box;
    1.76 +}
    1.77 +
    1.78 +input > .anonymous-div,
    1.79 +input::-moz-placeholder {
    1.80 +  word-wrap: normal !important;
    1.81 +  /* Make the line-height equal to the available height */
    1.82 +  line-height: -moz-block-height;
    1.83 +}
    1.84 +
    1.85 +@-moz-document url-prefix(chrome://) {
    1.86 +  input.uri-element-right-align:-moz-locale-dir(rtl) {
    1.87 +    direction: ltr !important;
    1.88 +    text-align: right !important;
    1.89 +  }
    1.90 +
    1.91 +  /* Make sure that the location bar's alignment in RTL mode changes according
    1.92 +     to the input box direction if the user switches the text direction using
    1.93 +     cmd_switchTextDirection (which applies a dir attribute to the <input>). */
    1.94 +  input.uri-element-right-align[dir=ltr]:-moz-locale-dir(rtl) {
    1.95 +    text-align: left !important;
    1.96 +  }
    1.97 +}
    1.98 +
    1.99 +textarea {
   1.100 +  margin: 1px 0 1px 0;
   1.101 +  border: 2px inset ThreeDFace;
   1.102 +  /* The 1px horizontal padding is for parity with Win/IE */
   1.103 +  padding: 0px 1px;
   1.104 +  background-color: -moz-Field;
   1.105 +  color: -moz-FieldText;
   1.106 +  font: medium -moz-fixed;
   1.107 +  text-rendering: optimizeLegibility;
   1.108 +  text-align: start;
   1.109 +  text-transform: none;
   1.110 +  word-spacing: normal;
   1.111 +  letter-spacing: normal;
   1.112 +  vertical-align: text-bottom;
   1.113 +  cursor: text;
   1.114 +  resize: both;
   1.115 +  -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas");
   1.116 +  -moz-appearance: textfield-multiline;
   1.117 +  text-indent: 0;
   1.118 +  -moz-user-select: text;
   1.119 +  text-shadow: none;
   1.120 +  word-wrap: break-word;
   1.121 +  overflow-clip-box: content-box;
   1.122 +}
   1.123 +
   1.124 +textarea > scrollbar {
   1.125 +  cursor: default;
   1.126 +}
   1.127 +
   1.128 +textarea > .anonymous-div,
   1.129 +input > .anonymous-div,
   1.130 +input::-moz-placeholder,
   1.131 +textarea::-moz-placeholder {
   1.132 +  white-space: pre;
   1.133 +  overflow: auto;
   1.134 +  border: 0px !important;
   1.135 +  padding: inherit !important;
   1.136 +  margin: 0px;
   1.137 +  text-decoration: inherit;
   1.138 +  -moz-text-decoration-color: inherit;
   1.139 +  -moz-text-decoration-style: inherit;
   1.140 +  display: inline-block;
   1.141 +  ime-mode: inherit;
   1.142 +  resize: inherit;
   1.143 +  -moz-control-character-visibility: visible;
   1.144 +  overflow-clip-box: inherit;
   1.145 +}
   1.146 +
   1.147 +textarea > .anonymous-div.wrap,
   1.148 +input > .anonymous-div.wrap {
   1.149 +  white-space: pre-wrap;
   1.150 +}
   1.151 +textarea > .anonymous-div.inherit-overflow,
   1.152 +input > .anonymous-div.inherit-overflow {
   1.153 +  overflow: inherit;
   1.154 +}
   1.155 +
   1.156 +input::-moz-placeholder,
   1.157 +textarea::-moz-placeholder {
   1.158 +  /*
   1.159 +   * Changing display to inline can leads to broken behaviour and will assert.
   1.160 +   */
   1.161 +  display: inline-block !important;
   1.162 +
   1.163 +  /*
   1.164 +   * Changing resize would display a broken behaviour and will assert.
   1.165 +   */
   1.166 +  resize: none !important;
   1.167 +
   1.168 +  overflow: hidden !important;
   1.169 +
   1.170 +  /*
   1.171 +   * The placeholder should be ignored by pointer otherwise, we might have some
   1.172 +   * unexpected behavior like the resize handle not being selectable.
   1.173 +   */
   1.174 +  pointer-events: none !important;
   1.175 +
   1.176 +  opacity: 0.54;
   1.177 +}
   1.178 +
   1.179 +textarea::-moz-placeholder {
   1.180 +  white-space: pre-wrap !important;
   1.181 +}
   1.182 +
   1.183 +input:-moz-read-write,
   1.184 +textarea:-moz-read-write {
   1.185 +  -moz-user-modify: read-write !important;
   1.186 +}
   1.187 +
   1.188 +select {
   1.189 +  margin: 0;
   1.190 +  border-color: ThreeDFace;
   1.191 +  background-color: -moz-Combobox;
   1.192 +  color: -moz-ComboboxText;
   1.193 +  font: -moz-list;
   1.194 +  /*
   1.195 +   * Note that the "UA !important" tests in
   1.196 +   * layout/style/test/test_animations.html depend on this rule, because
   1.197 +   * they need some UA !important rule to test.  If this changes, use a
   1.198 +   * different one there.
   1.199 +   */
   1.200 +  line-height: normal !important;
   1.201 +  white-space: nowrap !important;
   1.202 +  word-wrap: normal !important;
   1.203 +  text-align: start; 
   1.204 +  cursor: default;
   1.205 +  box-sizing: border-box;
   1.206 +  -moz-user-select: none;
   1.207 +  -moz-appearance: menulist;
   1.208 +  border-width: 2px;
   1.209 +  border-style: inset;
   1.210 +  text-indent: 0;
   1.211 +  overflow: -moz-hidden-unscrollable;
   1.212 +  text-shadow: none;
   1.213 +  /* No text-decoration reaching inside, by default */
   1.214 +  display: inline-block;
   1.215 +  page-break-inside: avoid;
   1.216 +  overflow-clip-box: padding-box !important; /* bug 992447 */
   1.217 +}
   1.218 +
   1.219 +/* Need the "select[size][multiple]" selector to override the settings on
   1.220 +   'select[size="1"]', eg if one has <select size="1" multiple> */
   1.221 +   
   1.222 +select[size],
   1.223 +select[multiple],
   1.224 +select[size][multiple] {
   1.225 +  /* Different alignment and padding for listbox vs combobox */
   1.226 +  background-color: -moz-Field;
   1.227 +  color: -moz-FieldText;
   1.228 +  vertical-align: text-bottom;
   1.229 +  padding: 1px 0 1px 0;
   1.230 +  -moz-appearance: listbox;
   1.231 +}
   1.232 +
   1.233 +select[size="0"],
   1.234 +select[size="1"] {
   1.235 +  /* Except this is not a listbox */
   1.236 +  background-color: -moz-Combobox;
   1.237 +  color: -moz-ComboboxText;
   1.238 +  vertical-align: baseline;
   1.239 +  padding: 0;
   1.240 +  -moz-appearance: menulist;
   1.241 +}
   1.242 +
   1.243 +select > button {
   1.244 +  width: 12px;
   1.245 +  height: 12px;
   1.246 +  white-space: nowrap;
   1.247 +  position: static !important;
   1.248 +  background-image: url("arrow.gif") !important;
   1.249 +  background-repeat: no-repeat !important;
   1.250 +  background-position: center !important;
   1.251 +  -moz-appearance: menulist-button;
   1.252 +
   1.253 +  /* Make sure to size correctly if the combobox has a non-auto height. */
   1.254 +  height: 100% ! important;
   1.255 +  box-sizing: border-box ! important;
   1.256 +
   1.257 +  /*
   1.258 +    Make sure to align properly with the display frame.  Note that we
   1.259 +    want the baseline of the combobox to match the baseline of the
   1.260 +    display frame, so the dropmarker is what gets the vertical-align.
   1.261 +  */
   1.262 +  vertical-align: top !important;
   1.263 +}
   1.264 +
   1.265 +select > button:active {
   1.266 +  background-image: url("arrowd.gif") !important;
   1.267 +}
   1.268 +
   1.269 +select:empty {
   1.270 +  width: 2.5em;
   1.271 +}
   1.272 +
   1.273 +*|*::-moz-display-comboboxcontrol-frame {
   1.274 +  overflow: -moz-hidden-unscrollable;
   1.275 +  /* This top/bottom padding plus the combobox top/bottom border need to
   1.276 +     add up to the top/bottom borderpadding of text inputs and buttons */ 
   1.277 +  padding-top: 1px;
   1.278 +  padding-bottom: 1px;
   1.279 +  -moz-padding-start: 4px;
   1.280 +  -moz-padding-end: 0;
   1.281 +  color: inherit;
   1.282 +  white-space: nowrap;
   1.283 +  text-align: inherit;
   1.284 +  -moz-user-select: none;
   1.285 +  /* Make sure to size correctly if the combobox has a non-auto height. */
   1.286 +  height: 100% ! important;
   1.287 +  box-sizing: border-box ! important;
   1.288 +  line-height: -moz-block-height;
   1.289 +}
   1.290 +
   1.291 +option {
   1.292 +  display: block;
   1.293 +  float: none !important;
   1.294 +  position: static !important;
   1.295 +  min-height: 1em;
   1.296 +  line-height: normal !important;
   1.297 +  -moz-user-select: none;
   1.298 +  text-indent: 0;
   1.299 +  white-space: nowrap !important;
   1.300 +  word-wrap: normal !important;
   1.301 +}
   1.302 +
   1.303 +select > option {
   1.304 +  padding-top : 0;
   1.305 +  padding-bottom: 0;
   1.306 +  -moz-padding-start: 3px;
   1.307 +  -moz-padding-end: 5px;
   1.308 +}
   1.309 +
   1.310 +option:checked {
   1.311 +  background-color: -moz-html-cellhighlight !important;
   1.312 +  color: -moz-html-cellhighlighttext !important;
   1.313 +}
   1.314 +
   1.315 +select:focus > option:checked,
   1.316 +select:focus > optgroup > option:checked {
   1.317 +  background-color: Highlight ! important;
   1.318 +  color: HighlightText ! important;
   1.319 +}
   1.320 +
   1.321 +optgroup {
   1.322 +  display: block;
   1.323 +  float: none !important;
   1.324 +  position: static !important;
   1.325 +  font: -moz-list;
   1.326 +  line-height: normal !important;
   1.327 +  font-style: italic;
   1.328 +  font-weight: bold;
   1.329 +  font-size: inherit;
   1.330 +  -moz-user-select: none;
   1.331 +  text-indent: 0;
   1.332 +  white-space: nowrap !important;
   1.333 +  word-wrap: normal !important;
   1.334 +}
   1.335 +
   1.336 +optgroup > option {
   1.337 +  -moz-padding-start: 20px;
   1.338 +  font-style: normal;
   1.339 +  font-weight: normal;
   1.340 +}
   1.341 +
   1.342 +optgroup:before {
   1.343 +  display: block;
   1.344 +  content: attr(label);
   1.345 +}
   1.346 +
   1.347 +*|*::-moz-dropdown-list {
   1.348 +  z-index: 2147483647;
   1.349 +  background-color: inherit;
   1.350 +  -moz-user-select: none;
   1.351 +  position: static !important;
   1.352 +  float: none !important;
   1.353 +
   1.354 +  /*
   1.355 +   * We can't change the padding here, because that would affect our
   1.356 +   * intrinsic width, since we scroll.  But at the same time, we want
   1.357 +   * to make sure that our left border+padding matches the left
   1.358 +   * border+padding of a combobox so that our scrollbar will line up
   1.359 +   * with the dropmarker.  So set our left border to 2px.
   1.360 +   */
   1.361 +  border: 1px outset black !important;
   1.362 +  border-left-width: 2px ! important;
   1.363 +} 
   1.364 +
   1.365 +input:disabled,
   1.366 +textarea:disabled,
   1.367 +option:disabled,
   1.368 +optgroup:disabled,
   1.369 +select:disabled:disabled /* Need the pseudo-class twice to have the specificity
   1.370 +                            be at least the same as select[size][multiple] above */
   1.371 +{
   1.372 +  -moz-user-input: disabled;
   1.373 +  color: GrayText;
   1.374 +  background-color: ThreeDFace;
   1.375 +  cursor: inherit;
   1.376 +}
   1.377 +
   1.378 +input:disabled,
   1.379 +textarea:disabled {
   1.380 +  cursor: default;
   1.381 +}
   1.382 +
   1.383 +option:disabled,
   1.384 +optgroup:disabled {
   1.385 +  background-color: transparent;
   1.386 +}
   1.387 +
   1.388 +/* hidden inputs */
   1.389 +input[type="hidden"] {
   1.390 +  -moz-appearance: none;
   1.391 +  display: none !important;
   1.392 +  padding: 0;
   1.393 +  border: 0;
   1.394 +  cursor: auto;
   1.395 +  -moz-user-focus: ignore;
   1.396 +  -moz-binding: none;
   1.397 +}
   1.398 +
   1.399 +/* image buttons */
   1.400 +input[type="image"] {
   1.401 +  -moz-appearance: none;
   1.402 +  padding: 0;
   1.403 +  border: none;
   1.404 +  background-color: transparent;
   1.405 +  font-family: sans-serif;
   1.406 +  font-size: small;
   1.407 +  cursor: pointer;
   1.408 +  -moz-binding: none;
   1.409 +}
   1.410 +
   1.411 +input[type="image"]:disabled {
   1.412 +  cursor: inherit;
   1.413 +}
   1.414 +
   1.415 +input[type="image"]:-moz-focusring {
   1.416 +  /* Don't specify the outline-color, we should always use initial value. */
   1.417 +  outline: 1px dotted;
   1.418 +}
   1.419 +
   1.420 +/* file selector */
   1.421 +input[type="file"] {
   1.422 +  display: inline-block;
   1.423 +  white-space: nowrap;
   1.424 +  overflow: hidden;
   1.425 +  overflow-clip-box: padding-box;
   1.426 +  color: inherit;
   1.427 +
   1.428 +  /* Revert rules which apply on all inputs. */
   1.429 +  -moz-appearance: none;
   1.430 +  -moz-binding: none;
   1.431 +  cursor: default;
   1.432 +
   1.433 +  border: none;
   1.434 +  background-color: transparent;
   1.435 +  padding: 0;
   1.436 +}
   1.437 +
   1.438 +input[type="file"] > xul|label {
   1.439 +  min-width: 12em;
   1.440 +  -moz-padding-start: 5px;
   1.441 +
   1.442 +  color: inherit;
   1.443 +  font-size: inherit;
   1.444 +  letter-spacing: inherit;
   1.445 +
   1.446 +  /*
   1.447 +   * Force the text to have LTR directionality. Otherwise filenames containing
   1.448 +   * RTL characters will be reordered with chaotic results.
   1.449 +   */
   1.450 +  direction: ltr !important;
   1.451 +}
   1.452 +
   1.453 +/* button part of file selector */
   1.454 +input[type="file"] > button[type="button"] {
   1.455 +  height: inherit;
   1.456 +  font-size: inherit;
   1.457 +  letter-spacing: inherit;
   1.458 +  cursor: inherit;
   1.459 +}
   1.460 +
   1.461 +/* colored part of the color selector button */
   1.462 +input[type="color"]:-moz-system-metric(color-picker-available)::-moz-color-swatch {
   1.463 +  width: 100%;
   1.464 +  height: 100%;
   1.465 +  min-width: 3px;
   1.466 +  min-height: 3px;
   1.467 +  margin-left: auto;
   1.468 +  margin-right: auto;
   1.469 +  box-sizing: border-box;
   1.470 +  border: 1px solid grey;
   1.471 +  display: block;
   1.472 +}
   1.473 +
   1.474 +/* Try to make RTL <input type='file'> look nicer. */
   1.475 +/* TODO: use text-align: match-parent when bug 645642 is fixed. */
   1.476 +input[type="file"]:-moz-dir(rtl) > xul|label {
   1.477 +  -moz-padding-start: 0px;
   1.478 +  padding-right: 5px;
   1.479 +  text-align: right;
   1.480 +}
   1.481 +
   1.482 +/* radio buttons */
   1.483 +input[type="radio"] {
   1.484 +  -moz-appearance: radio;
   1.485 +  margin: 3px 3px 0px 5px;
   1.486 +  border-radius: 100% !important;
   1.487 +}
   1.488 +
   1.489 +/* check boxes */
   1.490 +input[type="checkbox"] {
   1.491 +  -moz-appearance: checkbox;
   1.492 +  margin: 3px 3px 3px 4px;
   1.493 +  border-radius: 0 !important;
   1.494 +}
   1.495 +
   1.496 +/* common features of radio buttons and check boxes */
   1.497 +
   1.498 +/* NOTE: The width, height, border-width, and padding here must all
   1.499 +   add up the way nsFormControlFrame::GetIntrinsic(Width|Height)
   1.500 +   expects them to, or they will not come out with total width equal
   1.501 +   to total height on sites that set their 'width' or 'height' to 'auto'.
   1.502 +   (Should we maybe set !important on width and height, then?)  */
   1.503 +input[type="radio"],
   1.504 +input[type="checkbox"] {
   1.505 +  box-sizing: border-box;
   1.506 +  width: 13px;
   1.507 +  height: 13px;
   1.508 +  cursor: default;
   1.509 +  padding: 0 !important;
   1.510 +  -moz-binding: none;
   1.511 +  /* same colors as |input| rule, but |!important| this time. */
   1.512 +  background-color: -moz-Field ! important;
   1.513 +  color: -moz-FieldText ! important;
   1.514 +  border: 2px inset ThreeDFace ! important;
   1.515 +}
   1.516 +
   1.517 +input[type="radio"]:disabled,
   1.518 +input[type="radio"]:disabled:active,
   1.519 +input[type="radio"]:disabled:hover,
   1.520 +input[type="radio"]:disabled:hover:active,
   1.521 +input[type="checkbox"]:disabled,
   1.522 +input[type="checkbox"]:disabled:active,
   1.523 +input[type="checkbox"]:disabled:hover,
   1.524 +input[type="checkbox"]:disabled:hover:active {
   1.525 +  padding: 1px;
   1.526 +  border: 1px inset ThreeDShadow ! important;
   1.527 +  /* same as above, but !important */
   1.528 +  color: GrayText ! important;
   1.529 +  background-color: ThreeDFace ! important;
   1.530 +  cursor: inherit; 
   1.531 +}
   1.532 +
   1.533 +input[type="checkbox"]:-moz-focusring,
   1.534 +input[type="radio"]:-moz-focusring {
   1.535 +  border-style: groove !important;
   1.536 +}
   1.537 +
   1.538 +input[type="checkbox"]:hover:active,
   1.539 +input[type="radio"]:hover:active {
   1.540 +  background-color: ThreeDFace ! important;
   1.541 +  border-style: inset !important;
   1.542 +}
   1.543 +
   1.544 +/* buttons */
   1.545 +
   1.546 +/* Note: Values in nsNativeTheme IsWidgetStyled function 
   1.547 +   need to match button background/border values here */
   1.548 +
   1.549 +/* Non text-related properties for buttons: these ones are shared with
   1.550 +   input[type="color"] */
   1.551 +button,
   1.552 +input[type="color"]:-moz-system-metric(color-picker-available),
   1.553 +input[type="reset"],
   1.554 +input[type="button"],
   1.555 +input[type="submit"] {
   1.556 +  -moz-appearance: button;
   1.557 +  /* The sum of border-top, border-bottom, padding-top, padding-bottom
   1.558 +     must be the same here, for text inputs, and for <select>.  For
   1.559 +     buttons, make sure to include the -moz-focus-inner border/padding. */
   1.560 +  padding: 0px 6px 0px 6px;
   1.561 +  border: 2px outset ButtonFace;
   1.562 +  background-color: ButtonFace;
   1.563 +  cursor: default;
   1.564 +  box-sizing: border-box;
   1.565 +  -moz-user-select: none;
   1.566 +  -moz-binding: none;
   1.567 +}
   1.568 +
   1.569 +/* Text-related properties for buttons: these ones are not shared with
   1.570 +   input[type="color"] */
   1.571 +button,
   1.572 +input[type="reset"],
   1.573 +input[type="button"],
   1.574 +input[type="submit"] {
   1.575 +  color: ButtonText; 
   1.576 +  font: -moz-button;
   1.577 +  line-height: normal;
   1.578 +  white-space: pre;
   1.579 +  text-align: center;
   1.580 +  text-shadow: none;
   1.581 +  overflow-clip-box: padding-box;
   1.582 +}
   1.583 +
   1.584 +input[type="color"]:-moz-system-metric(color-picker-available) {
   1.585 +  width: 64px;
   1.586 +  height: 23px;
   1.587 +}
   1.588 +
   1.589 +button {
   1.590 +  /* Buttons should lay out like "normal" html, mostly */
   1.591 +  white-space: inherit;
   1.592 +  text-indent: 0;
   1.593 +  /* But no text-decoration reaching inside, by default */
   1.594 +  display: inline-block;
   1.595 +}
   1.596 +
   1.597 +*|*::-moz-button-content {
   1.598 +  display: block;
   1.599 +}
   1.600 +
   1.601 +button:hover,
   1.602 +input[type="color"]:-moz-system-metric(color-picker-available):hover,
   1.603 +input[type="reset"]:hover,
   1.604 +input[type="button"]:hover,
   1.605 +input[type="submit"]:hover {
   1.606 +  background-color: -moz-buttonhoverface;
   1.607 +}
   1.608 +
   1.609 +button:hover,
   1.610 +input[type="reset"]:hover,
   1.611 +input[type="button"]:hover,
   1.612 +input[type="submit"]:hover {
   1.613 +  color: -moz-buttonhovertext;
   1.614 +}
   1.615 +
   1.616 +button:active:hover,
   1.617 +input[type="color"]:-moz-system-metric(color-picker-available):active:hover,
   1.618 +input[type="reset"]:active:hover,
   1.619 +input[type="button"]:active:hover,
   1.620 +input[type="submit"]:active:hover {
   1.621 +  padding: 0px 5px 0px 7px;
   1.622 +  border-style: inset;
   1.623 +  background-color: ButtonFace;
   1.624 +}
   1.625 +
   1.626 +button:active:hover,
   1.627 +input[type="reset"]:active:hover,
   1.628 +input[type="button"]:active:hover,
   1.629 +input[type="submit"]:active:hover {
   1.630 +  color: ButtonText;
   1.631 +}
   1.632 +
   1.633 +button::-moz-focus-inner,
   1.634 +input[type="color"]:-moz-system-metric(color-picker-available)::-moz-focus-inner,
   1.635 +input[type="reset"]::-moz-focus-inner,
   1.636 +input[type="button"]::-moz-focus-inner,
   1.637 +input[type="submit"]::-moz-focus-inner,
   1.638 +input[type="file"] > button[type="button"]::-moz-focus-inner {
   1.639 +  padding: 0px 2px 0px 2px;
   1.640 +  border: 1px dotted transparent;
   1.641 +}
   1.642 +
   1.643 +button:-moz-focusring::-moz-focus-inner,
   1.644 +input[type="color"]:-moz-system-metric(color-picker-available):-moz-focusring::-moz-focus-inner,
   1.645 +input[type="reset"]:-moz-focusring::-moz-focus-inner,
   1.646 +input[type="button"]:-moz-focusring::-moz-focus-inner,
   1.647 +input[type="submit"]:-moz-focusring::-moz-focus-inner,
   1.648 +input[type="file"] > button[type="button"]:-moz-focusring::-moz-focus-inner {
   1.649 +  border-color: ButtonText;
   1.650 +}
   1.651 +
   1.652 +button:disabled:active, button:disabled,
   1.653 +input[type="color"]:-moz-system-metric(color-picker-available):disabled:active,
   1.654 +input[type="color"]:-moz-system-metric(color-picker-available):disabled,
   1.655 +input[type="reset"]:disabled:active,
   1.656 +input[type="reset"]:disabled,
   1.657 +input[type="button"]:disabled:active,
   1.658 +input[type="button"]:disabled,
   1.659 +select:disabled > button,
   1.660 +select:disabled > button,
   1.661 +input[type="submit"]:disabled:active,
   1.662 +input[type="submit"]:disabled {
   1.663 +  /* The sum of border-top, border-bottom, padding-top, padding-bottom
   1.664 +     must be the same here and for text inputs */
   1.665 +  padding: 0px 6px 0px 6px;
   1.666 +  border: 2px outset ButtonFace;
   1.667 +  cursor: inherit; 
   1.668 +}
   1.669 +
   1.670 +button:disabled:active, button:disabled,
   1.671 +input[type="reset"]:disabled:active,
   1.672 +input[type="reset"]:disabled,
   1.673 +input[type="button"]:disabled:active,
   1.674 +input[type="button"]:disabled,
   1.675 +select:disabled > button,
   1.676 +select:disabled > button,
   1.677 +input[type="submit"]:disabled:active,
   1.678 +input[type="submit"]:disabled {
   1.679 +  color: GrayText;
   1.680 +}
   1.681 +
   1.682 + /*
   1.683 +  * Make form controls inherit 'unicode-bidi' transparently as required by
   1.684 +  *  their various anonymous descendants and pseudo-elements:
   1.685 +  *
   1.686 +  * <textarea> and <input type="text">:
   1.687 +  *  inherit into the XULScroll frame with class 'anonymous-div' which is a
   1.688 +  *  child of the text control.
   1.689 +  *
   1.690 +  * Buttons (either <button>, <input type="submit">, <input type="button">
   1.691 +  *          or <input type="reset">)
   1.692 +  *  inherit into the ':-moz-button-content' pseudo-element.
   1.693 +  *
   1.694 +  * <select>:
   1.695 +  *  inherit into the ':-moz-display-comboboxcontrol-frame' pseudo-element and
   1.696 +  *  the <optgroup>'s ':before' pseudo-element, which is where the label of
   1.697 +  *  the <optgroup> gets displayed. The <option>s don't use anonymous boxes,
   1.698 +  *  so they need no special rules.
   1.699 +  */
   1.700 +textarea > .anonymous-div,
   1.701 +input > .anonymous-div,
   1.702 +input::-moz-placeholder,
   1.703 +textarea::-moz-placeholder,
   1.704 +*|*::-moz-button-content,
   1.705 +*|*::-moz-display-comboboxcontrol-frame,
   1.706 +optgroup:before {
   1.707 +  unicode-bidi: inherit;
   1.708 +  text-overflow: inherit;
   1.709 +}
   1.710 +
   1.711 +/**
   1.712 + * Set default style for invalid elements.
   1.713 + */
   1.714 +:not(output):-moz-ui-invalid {
   1.715 +  box-shadow: 0 0 1.5px 1px red;
   1.716 +}
   1.717 +
   1.718 +:not(output):-moz-ui-invalid:-moz-focusring {
   1.719 +  box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
   1.720 +}
   1.721 +
   1.722 +output:-moz-ui-invalid {
   1.723 +  color: red;
   1.724 +}
   1.725 +
   1.726 +@media print {
   1.727 +  input, textarea, select, button {
   1.728 +    -moz-user-input: none !important;
   1.729 +  }
   1.730 +
   1.731 +  input[type="file"] { height: 2em; }
   1.732 +}
   1.733 +
   1.734 +progress {
   1.735 +  -moz-appearance: progressbar;
   1.736 +  display: inline-block;
   1.737 +  vertical-align: -0.2em;
   1.738 +
   1.739 +  /* Default style in case of there is -moz-appearance: none; */
   1.740 +  border: 2px solid;
   1.741 +  /* #e6e6e6 is a light gray. */
   1.742 +  -moz-border-top-colors: ThreeDShadow #e6e6e6;
   1.743 +  -moz-border-right-colors: ThreeDHighlight #e6e6e6;
   1.744 +  -moz-border-bottom-colors: ThreeDHighlight #e6e6e6;
   1.745 +  -moz-border-left-colors: ThreeDShadow #e6e6e6;
   1.746 +  background-color: #e6e6e6;
   1.747 +}
   1.748 +
   1.749 +::-moz-progress-bar {
   1.750 +  /* Prevent styling that would change the type of frame we construct. */
   1.751 +  display: inline-block ! important;
   1.752 +  float: none ! important;
   1.753 +  position: static ! important;
   1.754 +  overflow: visible ! important;
   1.755 +  box-sizing: border-box ! important;
   1.756 +
   1.757 +  -moz-appearance: progresschunk;
   1.758 +  height: 100%;
   1.759 +  width: 100%;
   1.760 +
   1.761 +  /* Default style in case of there is -moz-appearance: none; */
   1.762 +  background-color: #0064b4; /* blue */
   1.763 +}
   1.764 +
   1.765 +meter {
   1.766 +  -moz-appearance: meterbar;
   1.767 +  display: inline-block;
   1.768 +  vertical-align: -0.2em;
   1.769 +
   1.770 +  background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
   1.771 +}
   1.772 +
   1.773 +::-moz-meter-bar {
   1.774 +  /* Block styles that would change the type of frame we construct. */
   1.775 +  display: inline-block ! important;
   1.776 +  float: none ! important;
   1.777 +  position: static ! important;
   1.778 +  overflow: visible ! important;
   1.779 +
   1.780 +  -moz-appearance: meterchunk;
   1.781 +  height: 100%;
   1.782 +  width: 100%;
   1.783 +}
   1.784 +
   1.785 +:-moz-meter-optimum::-moz-meter-bar {
   1.786 +  /* green. */
   1.787 +  background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
   1.788 +}
   1.789 +:-moz-meter-sub-optimum::-moz-meter-bar {
   1.790 +  /* orange. */
   1.791 +  background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
   1.792 +}
   1.793 +:-moz-meter-sub-sub-optimum::-moz-meter-bar {
   1.794 +  /* red. */
   1.795 +  background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
   1.796 +}
   1.797 +
   1.798 +input[type=range] {
   1.799 +  -moz-appearance: range;
   1.800 +  display: inline-block;
   1.801 +  width: 12em;
   1.802 +  height: 1.3em;
   1.803 +  margin: 0 0.7em;
   1.804 +  /* Override some rules that apply on all input types: */
   1.805 +  cursor: default;
   1.806 +  background: none;
   1.807 +  border: none;
   1.808 +  -moz-binding: none; /* we don't want any of platformHTMLBindings.xml#inputFields */
   1.809 +  /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
   1.810 +  -moz-user-select: none ! important;
   1.811 +}
   1.812 +
   1.813 +input[type=range][orient=vertical] {
   1.814 +  width: 1.3em;
   1.815 +  height: 12em;
   1.816 +}
   1.817 +
   1.818 +/**
   1.819 + * Ideally we'd also require :-moz-focusring here, but that doesn't currently
   1.820 + * work. Instead we only use the -moz-focus-outer border style if
   1.821 + * NS_EVENT_STATE_FOCUSRING is set (the check is in
   1.822 + * nsRangeFrame::BuildDisplayList).
   1.823 + */
   1.824 +input[type=range]::-moz-focus-outer {
   1.825 +  border: 1px dotted black;
   1.826 +}
   1.827 +
   1.828 +/**
   1.829 + * Layout handles positioning of this pseudo-element specially (so that content
   1.830 + * authors can concentrate on styling the thumb without worrying about the
   1.831 + * logic to position it). Specifically the 'margin', 'top' and 'left'
   1.832 + * properties are ignored.
   1.833 + *
   1.834 + * If content authors want to have a vertical range, they will also need to
   1.835 + * set the width/height of this pseudo-element.
   1.836 + */
   1.837 +input[type=range]::-moz-range-track {
   1.838 +  /* Prevent styling that would change the type of frame we construct. */
   1.839 +  display: inline-block !important;
   1.840 +  float: none !important;
   1.841 +  position: static !important;
   1.842 +  border: none;
   1.843 +  border-top: solid 0.1em lightgrey;
   1.844 +  border-bottom: solid 0.1em lightgrey;
   1.845 +  background-color: grey;
   1.846 +  width: 100%;
   1.847 +  height: 0.2em;
   1.848 +  /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
   1.849 +  -moz-user-select: none ! important;
   1.850 +}
   1.851 +
   1.852 +input[type=range][orient=vertical]::-moz-range-track {
   1.853 +  border-top: none;
   1.854 +  border-bottom: none;
   1.855 +  border-left: solid 0.1em lightgrey;
   1.856 +  border-right: solid 0.1em lightgrey;
   1.857 +  width: 0.2em;
   1.858 +  height: 100%;
   1.859 +}
   1.860 +
   1.861 +/**
   1.862 + * Layout handles positioning of this pseudo-element specially (so that content
   1.863 + * authors can concentrate on styling this pseudo-element without worrying
   1.864 + * about the logic to position it). Specifically the 'margin', 'top' and 'left'
   1.865 + * properties are ignored. Additionally, if the range is horizontal, the width
   1.866 + * property is ignored, and if the range range is vertical, the height property
   1.867 + * is ignored.
   1.868 + */
   1.869 +input[type=range]::-moz-range-progress {
   1.870 +  /* Prevent styling that would change the type of frame we construct. */
   1.871 +  display: inline-block !important;
   1.872 +  float: none !important;
   1.873 +  position: static !important;
   1.874 +  /* Since one of width/height will be ignored, this just sets the "other"
   1.875 +     dimension.
   1.876 +   */
   1.877 +  width: 0.2em;
   1.878 +  height: 0.2em;
   1.879 +  /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
   1.880 +  -moz-user-select: none ! important;
   1.881 +}
   1.882 +
   1.883 +/**
   1.884 + * Layout handles positioning of this pseudo-element specially (so that content
   1.885 + * authors can concentrate on styling the thumb without worrying about the
   1.886 + * logic to position it). Specifically the 'margin', 'top' and 'left'
   1.887 + * properties are ignored.
   1.888 + */
   1.889 +input[type=range]::-moz-range-thumb {
   1.890 +  /* Native theming is atomic for range. Set -moz-appearance on the range
   1.891 +   * to get rid of it. The thumb's -moz-appearance is fixed.
   1.892 +   */
   1.893 +  -moz-appearance: range-thumb !important;
   1.894 +  /* Prevent styling that would change the type of frame we construct. */
   1.895 +  display: inline-block !important;
   1.896 +  float: none !important;
   1.897 +  position: static !important;
   1.898 +  width: 1em;
   1.899 +  height: 1em;
   1.900 +  border: 0.1em solid grey;
   1.901 +  border-radius: 0.5em;
   1.902 +  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><linearGradient id='g' x2='0' y2='100%'><stop stop-color='%23ddd'/><stop offset='100%' stop-color='white'/></linearGradient><rect fill='url(%23g)' width='100%' height='100%'/></svg>");
   1.903 +  /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
   1.904 +  -moz-user-select: none ! important;
   1.905 +}
   1.906 +
   1.907 +/* As a temporary workaround until bug 677302 the rule for input[type=number]
   1.908 + * has moved to number-control.css
   1.909 + */
   1.910 +
   1.911 +input[type=number]::-moz-number-wrapper {
   1.912 +  /* Prevent styling that would change the type of frame we construct. */
   1.913 +  display: flex;
   1.914 +  float: none !important;
   1.915 +  position: static !important;
   1.916 +  height: 100%;
   1.917 +}
   1.918 +
   1.919 +input[type=number]::-moz-number-text {
   1.920 +  -moz-appearance: none;
   1.921 +  /* work around autofocus bug 939248 on initial load */
   1.922 +  -moz-user-modify: read-write;
   1.923 +  /* This pseudo-element is also an 'input' element (nested inside and
   1.924 +   * distinct from the <input type=number> element) so we need to prevent the
   1.925 +   * explicit setting of 'text-align' by the general CSS rule for 'input'
   1.926 +   * above. We want to inherit its value from its <input type=number>
   1.927 +   * ancestor, not have that general CSS rule reset it.
   1.928 +   */
   1.929 +  text-align: inherit;
   1.930 +  flex: 1;
   1.931 +  padding: 0;
   1.932 +  border: 0;
   1.933 +  margin: 0;
   1.934 +}
   1.935 +
   1.936 +input[type=number]::-moz-number-spin-box {
   1.937 +  display: flex;
   1.938 +  flex-direction: column;
   1.939 +%ifdef XP_WIN
   1.940 +  /* The Window's Theme's spin buttons have a very narrow minimum width, so
   1.941 +   * make it something reasonable:
   1.942 +   */
   1.943 +  width: 16px;
   1.944 +%endif
   1.945 +  height: 0;
   1.946 +  align-self: center;
   1.947 +  justify-content: center;
   1.948 +}
   1.949 +
   1.950 +input[type=number]::-moz-number-spin-up {
   1.951 +  -moz-appearance: spinner-upbutton;
   1.952 +  display: block; /* bug 926670 */
   1.953 +  flex: none;
   1.954 +  cursor: default;
   1.955 +  /* Style for when native theming is off: */
   1.956 +  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,4 L3,0 5,4" fill="dimgrey"/></svg>');
   1.957 +  background-repeat: no-repeat;
   1.958 +  background-position: center bottom;
   1.959 +  border: 1px solid darkgray;
   1.960 +  border-bottom: none;
   1.961 +  border-top-left-radius: 4px;
   1.962 +  border-top-right-radius: 4px;
   1.963 +}
   1.964 +
   1.965 +input[type=number]::-moz-number-spin-down {
   1.966 +  -moz-appearance: spinner-downbutton;
   1.967 +  display: block; /* bug 926670 */
   1.968 +  flex: none;
   1.969 +  cursor: default;
   1.970 +  /* Style for when native theming is off: */
   1.971 +  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,1 L3,5 5,1" fill="dimgrey"/></svg>');
   1.972 +  background-repeat: no-repeat;
   1.973 +  background-position: center top;
   1.974 +  border: 1px solid darkgray;
   1.975 +  border-top: none;
   1.976 +  border-bottom-left-radius: 4px;
   1.977 +  border-bottom-right-radius: 4px;
   1.978 +}
   1.979 +
   1.980 +input[type="number"] > div > div > div:hover {
   1.981 +  /* give some indication of hover state for the up/down buttons */
   1.982 +  background-color: lightblue;
   1.983 +}

mercurial