gecko/mobile/android/themes/core/content.css

316 lines
7.3 KiB
CSS

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%filter substitution
%include defines.inc
@namespace url("http://www.w3.org/1999/xhtml");
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
::-moz-selection {
background-color: @color_background_highlight@;
color: @color_text_highlight@;
}
/* Style the scrollbars */
html xul|scrollbar {
display: none;
}
xul|window xul|scrollbar {
display: block;
}
xul|window xul|scrollbar[orient="vertical"] {
-moz-appearance: none !important;
opacity: 0;
position: relative;
margin-left: -8px;
min-width: 8px;
background-color: transparent !important;
background-image: none !important;
border: 0px solid transparent !important;
}
xul|window xul|scrollbar[orient="vertical"]:-moz-locale-dir(rtl) {
margin-left: 2px;
margin-right: -10px;
}
xul|window xul|scrollbar[orient="vertical"] xul|thumb {
max-width: 6px !important;
min-width: 6px !important;
}
xul|window xul|scrollbar[orient="horizontal"] {
-moz-appearance: none !important;
opacity: 0;
position: relative;
min-height: 8px;
margin-top: -8px;
background-color: transparent !important;
background-image: none !important;
border: 0px solid transparent !important;
}
xul|window xul|scrollbar[orient="horizontal"] xul|thumb {
max-height: 6px !important;
min-height: 6px !important;
}
xul|*[panning="true"] xul|scrollbar {
opacity: 1;
}
xul|window xul|scrollbox {
overflow-y: scroll;
overflow-x: scroll;
}
xul|window xul|scrollbarbutton {
min-height: 8px !important;
min-width: 8px !important;
-moz-appearance: none !important;
visibility: hidden;
}
xul|window xul|scrollbarbutton[sbattr="scrollbar-up-top"],
xul|window xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] {
display: none;
}
xul|window xul|scrollbar xul|thumb {
background-color: @color_background_scroller@ !important;
-moz-border-top-colors: none !important;
-moz-border-bottom-colors: none !important;
-moz-border-right-colors: none !important;
-moz-border-left-colors: none !important;
border: 1px solid rgba(255, 255, 255, 0.4) !important;
border-radius: @form_border_radius@;
}
select:not([size]):not([multiple]) > xul|scrollbar,
select[size="1"] > xul|scrollbar,
select:not([size]):not([multiple]) xul|scrollbarbutton,
select[size="1"] xul|scrollbarbutton {
display: block;
margin-left: 0;
min-width: 16px;
}
/* Override inverse OS themes */
select,
textarea,
button,
xul|button,
* > input:not([type="image"]) {
-moz-appearance: none !important; /* See bug 598421 for fixing the platform */
border-radius: @form_border_radius@;
}
select[size],
select[multiple],
select[size][multiple],
textarea,
* > input:not([type="image"]):not([type="image"]) {
border-style: solid;
border-color: @form_border@;
color: @form_text@;
background-color: @form_background@;
}
/* Selects are handled by the form helper, see bug 685197 */
select option, select optgroup {
pointer-events: none;
}
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"],
* > input[type="button"],
* > input[type="submit"],
* > input[type="reset"],
button {
border-style: solid;
border-color: @form_border@;
color: @form_text@;
background-color: @form_background@;
}
input[type="checkbox"] {
background: @form_background@;
}
input[type="radio"] {
background: @form_background@
}
select {
border-width: 1px;
padding: 1px;
}
select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
padding: 0 1px 0 1px;
}
* > input:not([type="image"]) {
border-width: 1px;
padding: 1px;
}
textarea {
resize: none;
border-width: 1px;
padding: 2px 1px 2px 1px;
}
input[type="button"],
input[type="submit"],
input[type="reset"],
button {
border-width: 1px;
padding: 0 7px 0 7px;
}
input[type="radio"],
input[type="checkbox"] {
max-width: 14px;
max-height: 14px;
border: 1px solid @form_border@ !important;
padding: 2px 1px 2px 1px;
}
select > button {
border-width: 0px !important;
margin: 0px !important;
padding: 0px !important;
border-radius: 0;
color: #414141;
background-size: auto auto;
background-color: transparent;
background-image: url("chrome://browser/skin/images/dropmarker.svg") !important;
background-position: -moz-calc(50% + 1px) center !important;
background-repeat: no-repeat !important;
font-size: inherit;
}
select[size]:focus,
select[multiple]:focus,
select[size][multiple]:focus,
textarea:focus,
input[type="file"]:focus > input[type="text"],
* > input:not([type="image"]):focus {
outline: 0px !important;
border-style: solid;
border-color: @form_border@;
background-color: @form_background@;
}
select:not([size]):not([multiple]):focus,
select[size="0"]:focus,
select[size="1"]:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
button:focus {
outline: 0px !important;
border-style: solid;
border-color: @form_border@;
background-color: @form_background@;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
border-color: @form_border@ !important;
}
input[type="checkbox"]:focus {
background: @form_background@;
}
input[type="radio"]:focus {
background: @form_background@;
}
/* we need to be specific for selects because the above rules are specific too */
textarea[disabled],
select[size][disabled],
select[multiple][disabled],
select[size][multiple][disabled],
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled],
button[disabled],
button[disabled]:active,
* > input:not([type="image"])[disabled],
* > input:not([type="image"])[disabled]:active {
color: @form_text_disabled@;
border-color: @form_border@;
border-style: solid;
border-width: 1px;
background: @form_background_disabled@;
}
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
background: @form_background_disabled@;
}
input[type="button"][disabled],
input[type="button"][disabled]:active,
input[type="submit"][disabled],
input[type="submit"][disabled]:active,
input[type="reset"][disabled],
input[type="reset"][disabled]:active,
button[disabled],
button[disabled]:active {
padding: 0 7px 0 7px;
background: @form_background_disabled@;
}
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 {
border:1px solid @form_border@ !important;
}
select[disabled] > button {
opacity: 0.6;
padding: 1px 7px 1px 7px;
}
/* -moz-touch-enabled? media elements */
:-moz-any(video, audio) > xul|videocontrols {
-moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls");
}
*:-moz-any-link:active,
*[role=button]:active,
button:not([disabled]):active,
input:not(:focus):not([disabled]):active,
select:not([disabled]):active,
textarea:not(:focus):not([disabled]):active,
option:active,
label:active,
xul|menulist:active {
background-color: @color_background_highlight_overlay@;
}
input[type=number] > div > div, /* work around bug 946184 */
input[type=number]::-moz-number-spin-box {
display: none;
}