pjs/themes/modern/global/button.css

153 строки
4.4 KiB
CSS

/* NEW WIDGET ANDING: <button> */
/** Default Button Styles (apply to usage of <button> without
* any applied class).
**/
/* outer frame */
button
{
border : 1px solid #000000;
-moz-border-radius : 3px 2px 2px 3px;
margin : 1px 5px 2px 5px;
background-color : #CCCCCC;
}
button[disabled="true"],
button[disabled="true"]:hover,
button[disabled="true"]:hover:active
{
border : 1px solid #999999;
color : #999999;
}
/* internal frame */
button > .button-internal-box
{
vertical-align : middle;
text-align : center;
border : 1px outset #CCCCCC;
padding : 2px;
}
button:hover:active > .button-internal-box
{
border : 1px inset #CCCCCC;
padding : 3px 1px 1px 3px;
}
button[disabled="true"] > .button-internal-box,
button[disabled="true"]:hover > .button-internal-box,
button[disabled="true"]:hover:active > .button-internal-box
{
border : 1px outset #CCCCCC;
-moz-border-radius : 0px;
padding : 2px;
}
/* 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 "DEFAULT" buttons (usually 'OK' or equivalent in dialogs.
* To activate, set 'default' attribute on button.
**/
/* outer frame */
button[default]
{
/* XXX this is a HACK until 'orient' is supported in CSS! XXX */
/* strictly speaking not necessary because default for buttonright is
* to lay image out horizontally, but leaving here as a reminder to
* implement this feature */
behavior : url(resource:/chrome/xulBindings.xml#buttonright);
font-weight : bold;
list-style-image : url("chrome://global/skin/return.gif");
}
button[default][disabled="true"]
{
list-style-image : url("chrome://global/skin/return-disabled.gif");
}
/** 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;
}
/** 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
{
border : 0px ! important;
margin : 0px;
padding : 0px;
}