зеркало из https://github.com/mozilla/pjs.git
270 строки
7.7 KiB
CSS
270 строки
7.7 KiB
CSS
/* NEW WIDGET ANDING: <button> */
|
|
|
|
/** plain (raw) buttons, class="plain" **/
|
|
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
|
|
{
|
|
-moz-binding : url(chrome://global/content/xulBindings.xml#buttonleft);
|
|
border : 0px !important;
|
|
margin : 0px;
|
|
padding : 0px;
|
|
}
|
|
|
|
/*** class = "plain-extended" ***/
|
|
/********************************/
|
|
/* This is a dummy class that is specified in the several XUL files for the sake of the
|
|
* Macintosh Classic Skin. This class has essentially the same behavior and styles as
|
|
* the above <button> and accompanying styles, but is useful in the Mac Classic skin. This is because <button>
|
|
* styles have been completely rewritten to produce Macintosh buttons with bevels, rounded corners,
|
|
* etc. Plain-extended thereby functions to produce square buttons with all the same hover and active
|
|
* effects that modern <button>'s do.
|
|
********************************/
|
|
|
|
button.plain-extended {}
|
|
|
|
|
|
/** Default Button Styles (apply to usage of <button> without
|
|
* any applied class).
|
|
**/
|
|
|
|
/* outer frame */
|
|
button
|
|
{
|
|
-moz-binding : url("chrome://global/skin/globalBindings.xml#three-slice-button");
|
|
background-color : transparent;
|
|
border : 0px;
|
|
margin : 4px 5px 5px 5px;
|
|
color : #1C1D1F;
|
|
min-width : 60px;
|
|
}
|
|
|
|
button[disabled="true"], button[disabled="true"]:hover, button[disabled="true"]:hover:active
|
|
{
|
|
border : 0px;
|
|
color : #595F61;
|
|
}
|
|
|
|
.button-image-left {
|
|
background : url(chrome://global/skin/button-left.gif) no-repeat;
|
|
width : 9px;
|
|
height : 19px;
|
|
}
|
|
|
|
.button-image-middle {
|
|
background : url(chrome://global/skin/button-middle.gif) repeat-x;
|
|
}
|
|
|
|
.button-text-box {
|
|
text-align : center;
|
|
vertical-align : middle;
|
|
padding : 0px;
|
|
font-size : 12px;
|
|
font-family : charcoal, ms sans serif;
|
|
font-weight : normal;
|
|
margin-right : 2px;
|
|
margin-bottom : 2px;
|
|
}
|
|
|
|
.button-image-right {
|
|
background : url(chrome://global/skin/button-right.gif) no-repeat;
|
|
width : 7px;
|
|
height : 19px;
|
|
}
|
|
|
|
.button-top-spring {
|
|
height : 2px;
|
|
}
|
|
|
|
.button-bottom-spring {
|
|
height : 1px;
|
|
}
|
|
|
|
button:hover:active {
|
|
color : #1C1D1F;
|
|
}
|
|
|
|
button:hover:active > .button-image-left {
|
|
background : url(chrome://global/skin/button-clicked-left.gif) no-repeat;
|
|
}
|
|
|
|
button:hover:active > .button-image-middle {
|
|
background : url(chrome://global/skin/button-clicked-middle.gif) repeat-x;
|
|
}
|
|
|
|
button:hover:active > .button-image-right {
|
|
background : url(chrome://global/skin/button-clicked-right.gif) no-repeat;
|
|
}
|
|
|
|
button[disabled="true"] > .button-image-left,
|
|
button[disabled="true"]:hover:active > .button-image-left {
|
|
background : url(chrome://global/skin/button-disabled-left.gif) no-repeat;
|
|
}
|
|
|
|
button[disabled="true"] > .button-image-middle,
|
|
button[disabled="true"]:hover:active > .button-image-middle {
|
|
background : url(chrome://global/skin/button-disabled-middle.gif) repeat-x;
|
|
}
|
|
|
|
button[disabled="true"] > .button-image-right,
|
|
button[disabled="true"]:hover:active > .button-image-right {
|
|
background : url(chrome://global/skin/button-disabled-right.gif) no-repeat;
|
|
}
|
|
|
|
|
|
/* Default Button States */
|
|
|
|
button[default="true"] {
|
|
margin: 2px 5px 3px 5px;
|
|
}
|
|
|
|
.button-image-left[default="true"] {
|
|
background : url(chrome://global/skin/button-def-left.gif) no-repeat;
|
|
width: 11px;
|
|
height: 23px;
|
|
}
|
|
|
|
.button-image-middle[default="true"] {
|
|
background : url(chrome://global/skin/button-def-middle.gif) repeat-x;
|
|
}
|
|
|
|
.button-image-right[default="true"] {
|
|
background : url(chrome://global/skin/button-def-right.gif) no-repeat;
|
|
width: 9px;
|
|
height: 23px;
|
|
}
|
|
|
|
button:hover:active > .button-image-left[default="true"] {
|
|
background : url(chrome://global/skin/button-def-clicked-left.gif) no-repeat;
|
|
}
|
|
|
|
button:hover:active > .button-image-middle[default="true"] {
|
|
background : url(chrome://global/skin/button-def-clicked-middle.gif) repeat-x;
|
|
}
|
|
|
|
button:hover:active > .button-image-right[default="true"] {
|
|
background : url(chrome://global/skin/button-def-clicked-right.gif) no-repeat;
|
|
}
|
|
|
|
.button-image-left[default="true"][disabled="true"],
|
|
button[default="true"][disabled="true"]:hover:active > .button-image-left {
|
|
background : url(chrome://global/skin/button-def-disabled-left.gif) no-repeat;
|
|
}
|
|
|
|
.button-image-middle[default="true"][disabled="true"],
|
|
button[default="true"][disabled="true"]:hover:active > .button-image-middle {
|
|
background : url(chrome://global/skin/button-def-disabled-mid.gif) repeat-x;
|
|
}
|
|
|
|
.button-image-right[default="true"][disabled="true"],
|
|
button[default="true"][disabled="true"]:hover:active > .button-image-right {
|
|
background : url(chrome://global/skin/button-def-disabled-right.gif) no-repeat;
|
|
}
|
|
|
|
/* text wrapping frame (hack because <text> does not support alignment) */
|
|
.button-text-container
|
|
{
|
|
text-align : center;
|
|
vertical-align : middle;
|
|
}
|
|
|
|
/* text frame */
|
|
.button-text
|
|
{
|
|
padding : 0px 2px 0px 2px;
|
|
}
|
|
|
|
button[orient="vertical"] > .button-internal-box > .button-text-container > .button-text
|
|
{
|
|
padding : 2px 2px 0px 2px;
|
|
}
|
|
|
|
/** Styles for 'dialog' buttons (usually any command button in a dialog)
|
|
* This class gives buttons 10px of padding on each side to increase the
|
|
* strike area and make buttons with small amounts of text (e.g. 'OK')
|
|
* look less silly.
|
|
**/
|
|
|
|
/* internal frame */
|
|
.button-dialog > .button-internal-box,
|
|
.button-dialog:hover > .button-internal-box
|
|
{
|
|
padding : 2px 10px 2px 10px;
|
|
}
|
|
|
|
.button-dialog:hover:hover:active > .button-internal-box
|
|
{
|
|
padding : 3px 9px 1px 11px;
|
|
}
|
|
|
|
/** Styles for grey toolbar buttons. These buttons are used in places like
|
|
* editor's formatting toolbar or toolbars wanting a button similar to a command
|
|
* button but without an initial outset frame.
|
|
**/
|
|
.button-borderless
|
|
{
|
|
border : 1px solid #CCCCCC;
|
|
}
|
|
|
|
.button-borderless:hover
|
|
{
|
|
border : 1px solid #000000;
|
|
}
|
|
|
|
.button-borderless > .button-internal-box
|
|
{
|
|
border : 1px solid #CCCCCC;
|
|
}
|
|
|
|
.button-borderless:hover > .button-internal-box
|
|
{
|
|
border : 1px outset #CCCCCC;
|
|
}
|
|
|
|
.button-borderless:hover:active > .button-internal-box
|
|
{
|
|
border : 1px inset #CCCCCC;
|
|
}
|
|
|
|
/**
|
|
* utility class for buttons with associated popup
|
|
**/
|
|
.button-popup
|
|
{
|
|
list-style-image : url(chrome://global/skin/taskbar-popup-arrow.gif);
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Reorder buttons
|
|
**/
|
|
|
|
.reorder-up
|
|
{
|
|
min-width : 0px;
|
|
list-style-image : url("chrome://global/skin/simple-arrow-up.gif");
|
|
}
|
|
|
|
.reorder-down
|
|
{
|
|
min-width : 0px;
|
|
list-style-image : url("chrome://global/skin/simple-arrow-down.gif");
|
|
}
|
|
|
|
.reorder-up > .button-internal-box > .button-icon,
|
|
.reorder-down > .button-internal-box > .button-icon
|
|
{
|
|
margin : 0;
|
|
padding : 0;
|
|
}
|
|
|
|
|