gecko-dev/themes/modern/global/button.css
2001-10-02 03:06:51 +00:00

438 lines
14 KiB
CSS

/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Joe Hewitt (hewitt@netscape.com)
*/
/* ===== button.css =====================================================
== Styles used by the XUL button element.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: nine slice button :::::::::::::::::::::::::::::::::::::::::::::::::
:: This is the default style used for all buttons. This style is fully
:: scalable in 2 dimensions. It supports normal and default buttons in
:: both active and disabled states, which includes 6 sets of sliced
:: images.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
button {
-moz-user-focus: normal;
margin: 3px;
border: 2px solid transparent;
min-width: 6em;
color: #000000;
font: menu;
}
.button-text-box {
padding: 3px 2px 3px 2px;
}
.button-text {
margin: 0px 3px !important;
text-align: center;
}
/* .......... focused state .......... */
button:focus {
border-color: #98A5B2;
-moz-border-radius: 6px;
}
button[default]:focus {
-moz-border-radius: 8px;
}
/* .......... normal state .......... */
.button-box-left {
width: 6px;
}
.button-left-top {
background: url("chrome://global/skin/button/btn-lft-top.gif") no-repeat;
height: 9px;
}
.button-left-mid {
background: url("chrome://global/skin/button/btn-lft-mid.gif") repeat-y;
}
.button-left-btm {
background: url("chrome://global/skin/button/btn-lft-btm.gif") no-repeat;
height: 8px;
}
.button-box-mid {
background-color: #A7B5C2;
}
.button-mid-top {
background: url("chrome://global/skin/button/btn-mid-top.gif") repeat-x;
height: 9px;
}
.button-mid-btm {
background: url("chrome://global/skin/button/btn-mid-btm.gif") repeat-x;
height: 8px;
}
.button-box-right {
width: 6px;
}
.button-right-top {
background: url("chrome://global/skin/button/btn-rit-top.gif") no-repeat;
height: 9px;
}
.button-right-mid {
background: url("chrome://global/skin/button/btn-rit-mid.gif") repeat-y;
}
.button-right-btm {
background: url("chrome://global/skin/button/btn-rit-btm.gif") no-repeat;
height: 8px;
}
/* .......... active/open/checked state .......... */
button:hover:active,
button[checked="true"],
button[open="true"] {
color: #FFFFFF;
}
button:hover:active > .box-inherit > .button-box-left > .button-left-top,
button[checked="true"] > .box-inherit > .button-box-left > .button-left-top,
button[open="true"] > .box-inherit > .button-box-left > .button-left-top {
background-image: url("chrome://global/skin/button/btn-act-lft-top.gif");
}
button:hover:active > .box-inherit > .button-box-left > .button-left-mid,
button[checked="true"] > .box-inherit > .button-box-left > .button-left-mid,
button[open="true"] > .box-inherit > .button-box-left > .button-left-mid {
background-image: url("chrome://global/skin/button/btn-act-lft-mid.gif");
}
button:hover:active > .box-inherit > .button-box-left > .button-left-btm,
button[checked="true"] > .box-inherit > .button-box-left > .button-left-btm,
button[open="true"] > .box-inherit > .button-box-left > .button-left-btm {
background-image: url("chrome://global/skin/button/btn-act-lft-btm.gif");
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid,
button[checked="true"] > .box-inherit > .button-stack > .button-box-mid,
button[open="true"] > .box-inherit > .button-stack > .button-box-mid {
background-color: #90A1B3;
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top,
button[checked="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-top,
button[open="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-top {
background-image: url("chrome://global/skin/button/btn-act-mid-top.gif");
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm,
button[checked="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm,
button[open="true"] > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm {
background-image: url("chrome://global/skin/button/btn-act-mid-btm.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-top,
button[checked="true"] > .box-inherit > .button-box-right > .button-right-top,
button[open="true"] > .box-inherit > .button-box-right > .button-right-top {
background-image: url("chrome://global/skin/button/btn-act-rit-top.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-mid,
button[checked="true"] > .box-inherit > .button-box-right > .button-right-mid,
button[open="true"] > .box-inherit > .button-box-right > .button-right-mid {
background-image: url("chrome://global/skin/button/btn-act-rit-mid.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-btm,
button[checked="true"] > .box-inherit > .button-box-right > .button-right-btm,
button[open="true"] > .box-inherit > .button-box-right > .button-right-btm {
background-image: url("chrome://global/skin/button/btn-act-rit-btm.gif");
}
/* .......... disabled state .......... */
button[disabled="true"],
button[disabled="true"]:hover:active {
color: #8C99AB;
}
button:hover:active > .box-inherit > .button-box-left > .button-left-top[disabled="true"],
.button-left-top[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-top.gif");
}
button:hover:active > .box-inherit > .button-box-left > .button-left-mid[disabled="true"],
.button-left-mid[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-mid.gif");
}
button:hover:active > .box-inherit > .button-box-left > .button-left-btm[disabled="true"],
.button-left-btm[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-btm.gif");
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid[disabled="true"],
.button-box-mid[disabled="true"] {
background-color: #B7BFCB;
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[disabled="true"],
.button-mid-top[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-mid-top.gif");
}
button:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"],
.button-mid-btm[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-mid-btm.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-top[disabled="true"],
.button-right-top[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-top.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-mid[disabled="true"],
.button-right-mid[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-mid.gif");
}
button:hover:active > .box-inherit > .button-box-right > .button-right-btm[disabled="true"],
.button-right-btm[disabled="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-btm.gif");
}
/* .......... default normal state .......... */
button[default="true"] {
margin: 2px;
}
.button-box-left[default="true"] {
width: 7px;
}
.button-left-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-lft-top.gif");
height: 9px;
}
.button-left-mid[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-lft-mid.gif");
}
.button-left-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-lft-btm.gif");
height: 10px;
}
.button-mid-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-mid-top.gif");
height: 9px;
}
.button-mid-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-mid-btm.gif");
height: 10px;
}
.button-box-right[default="true"] {
width: 7px;
}
.button-right-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-rit-top.gif");
height: 9px;
}
.button-right-mid[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-rit-mid.gif");
}
.button-right-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-rit-btm.gif");
height: 10px;
}
/* .......... default active state .......... */
:hover:active > .box-inherit > .button-box-left > .button-left-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-lft-top.gif");
}
:hover:active > .box-inherit > .button-box-left > .button-left-mid[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-lft-mid.gif");
}
:hover:active > .box-inherit > .button-box-left > .button-left-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-lft-btm.gif");
}
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-mid-top.gif");
}
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-mid-btm.gif");
}
:hover:active > .box-inherit > .button-box-right > .button-right-top[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-rit-top.gif");
}
:hover:active > .box-inherit > .button-box-right > .button-right-mid[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-rit-mid.gif");
}
:hover:active > .box-inherit > .button-box-right > .button-right-btm[default="true"] {
background-image: url("chrome://global/skin/button/btn-def-act-rit-btm.gif");
}
/* .......... default disabled state (the same as normal disabled) .......... */
button[default="true"][disabled="true"] {
margin-top: 3px;
margin-bottom: 3px;
}
:hover:active > .box-inherit > .button-box-left > .button-left-top[disabled="true"][default="true"],
.button-left-top[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-top.gif");
height: 9px;
}
.button-box-left[disabled="true"][default="true"] {
width: 6px;
}
:hover:active > .box-inherit > .button-box-left > .button-left-mid[disabled="true"][default="true"],
.button-left-mid[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-mid.gif");
}
:hover:active > .box-inherit > .button-box-left > .button-left-btm[disabled="true"][default="true"],
.button-left-btm[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-lft-btm.gif");
height: 8px;
}
:hover:active > .box-inherit > .button-stack > .button-box-mid[disabled="true"][default="true"],
.button-box-mid[disabled="true"][default="true"] {
background-color: #B7BFCB;
}
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-top[disabled="true"][default="true"],
.button-mid-top[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-mid-top.gif");
height: 9px;
}
:hover:active > .box-inherit > .button-stack > .button-box-mid > .button-mid-btm[disabled="true"][default="true"],
.button-mid-btm[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-mid-btm.gif");
height: 8px;
}
.button-box-right[disabled="true"][default="true"] {
width: 6px;
}
:hover:active > .box-inherit > .button-box-right > .button-right-top[disabled="true"][default="true"],
.button-right-top[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-top.gif");
height: 9px;
}
:hover:active > .box-inherit > .button-box-right > .button-right-mid[disabled="true"][default="true"],
.button-right-mid[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-mid.gif");
}
:hover:active > .box-inherit > .button-box-right > .button-right-btm[disabled="true"][default="true"],
.button-right-btm[disabled="true"][default="true"] {
background-image: url("chrome://global/skin/button/btn-dis-rit-btm.gif");
height: 8px;
}
/* ::::: menu-buttons ::::: */
button[type="menu-button"] {
-moz-user-focus: ignore;
margin: 0px;
border: none;
}
.button-menubutton-dropmarker-box {
-moz-box-align: center;
-moz-box-pack: center;
}
.button-menubutton-dropmarker {
margin: 1px;
list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}
.button-menubutton-dropmarker[disabled="true"] {
list-style-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif");
}
.button-menubutton-dropmarker[open="true"] {
margin: 2px 0px 0px 2px;
}
/* ::::: plain buttons ::::: */
button.plain,
button.plain:hover,
button.plain:hover:active,
button.plain:hover:active > .button-internal-box,
button.plain > .button-internal-box,
button.plain > .button-internal-box:hover:active,
button.plain > .button-internal-box > .button-text-container,
button.plain > .button-internal-box > .button-text-container:hover:active,
button.plain > .button-internal-box > .button-text-container
> .button-text,
button.plain > .button-internal-box > .button-text-container
> .button.text:hover:active,
button.plain > .button-internal-box > .button-icon,
button.plain > .button-internal-box > .button.icon:hover:active
{
margin: 0px;
border: none !important;
padding: 0px;
}
/* ::::: dlgtype buttons ::::: */
/* XXX change me to dlgtype="ok" */
.exit-dialog {
font: menu;
}