mediawiki-extensions-Visual.../modules/oojs-ui/styles/OO.ui.Widget.css
Trevor Parscal d2dfb9ac4f Split oojs-ui from ve.ui
* Move and rename generic parts of ve.ui to OO.ui
* We now have a UI test suite because ve.Element (outside ve.ui)
  is now part of oojs-ui, so it needs a test suite.
* Added to the MW test run (just like we do for unicodejs).
* Updated csslint config (also added ve-mw and syntaxhighlight
  which were missing).

oojs-ui still depends on the TriggerRegistry in VE, this is addressed
in a follow-up commit.

Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
2013-10-28 22:40:08 -07:00

556 lines
13 KiB
CSS

/*!
* ObjectOriented UserInterface Widget styles.
*
* @copyright 2011-2013 OOJS Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/* OO.ui.ButtonWidget */
.oo-ui-buttonWidget {
display: inline-block;
vertical-align: middle;
}
a.oo-ui-buttonWidget-button {
color: #333;
cursor: pointer;
display: inline-block;
vertical-align: middle;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* OO.ui.IconButtonWidget */
.oo-ui-iconButtonWidget {
display: inline-block;
position: relative;
-webkit-transition: opacity 200ms;
-moz-transition: opacity 200ms;
-o-transition: opacity 200ms;
transition: opacity 200ms;
}
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button > .oo-ui-iconedElement-icon {
opacity: 0.8;
display: inline-block;
vertical-align: middle;
background-position: center center;
background-repeat: no-repeat;
width: 2em;
height: 2em;
}
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button:hover > .oo-ui-iconedElement-icon,
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button:focus > .oo-ui-iconedElement-icon {
opacity: 1;
}
.oo-ui-iconButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button > .oo-ui-iconedElement-icon {
opacity: 0.2;
}
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button > .oo-ui-labeledElement-label {
display: inline-block;
vertical-align: middle;
margin-left: 0.25em;
color: #333;
}
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button:hover > .oo-ui-labeledElement-label,
.oo-ui-iconButtonWidget .oo-ui-buttonWidget-button:focus > .oo-ui-labeledElement-label {
color: #000;
}
.oo-ui-iconButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button > .oo-ui-labeledElement-label {
color: #ccc;
}
/* OO.ui.PopupButtonWidget */
.oo-ui-popupButtonWidget {
position: relative;
}
.oo-ui-popupButtonWidget .oo-ui-popupWidget {
position: absolute;
left: 1em;
cursor: auto;
}
/* OO.ui.PushButtonWidget */
.oo-ui-pushButtonWidget .oo-ui-buttonWidget-button {
display: inline-block;
font-size: 1em;
margin: 0.1em 0;
padding: 0.2em 0.8em;
border-radius: 0.3em;
vertical-align: top;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
box-shadow: 0 0.1em 0.25em rgba(0, 0, 0, 0.1);
text-align: center;
/* Animation */
-webkit-transition: border-color 100ms;
-moz-transition: border-color 100ms;
-o-transition: border-color 100ms;
transition: border-color 100ms;
/* Gray */
border: 1px #c9c9c9 solid;
background-color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient(
GradientType=0,startColorstr=#ffffff, endColorstr=#f0f0f0
);
background-image: -webkit-gradient(
linear, right top, right bottom, color-stop(0%,#ffffff), color-stop(100%,#f0f0f0)
);
background-image: -webkit-linear-gradient(top, #ffffff 0%, #f0f0f0 100%);
background-image: -moz-linear-gradient(top, #ffffff 0%, #f0f0f0 100%);
background-image: -ms-linear-gradient(top, #ffffff 0%, #f0f0f0 100%);
background-image: -o-linear-gradient(top, #ffffff 0%, #f0f0f0 100%);
background-image: linear-gradient(top, #ffffff 0%, #f0f0f0 100%);
}
.oo-ui-pushButtonWidget .oo-ui-buttonWidget-button:hover,
.oo-ui-pushButtonWidget .oo-ui-buttonWidget-button:focus {
border-color: #aaa;
}
.oo-ui-pushButtonWidget .oo-ui-buttonWidget-button:active {
border-color: #ddd;
box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, 0.07);
color: black;
}
.oo-ui-pushButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button,
.oo-ui-pushButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button:active {
opacity: 0.5;
cursor: default;
box-shadow: none;
color: #333;
}
.oo-ui-pushButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button:hover,
.oo-ui-pushButtonWidget.oo-ui-widget-disabled .oo-ui-buttonWidget-button:focus {
border-color: #ccc;
box-shadow: none;
}
.oo-ui-pushButtonWidget .oo-ui-buttonWidget-button > .oo-ui-labeledElement-label {
display: inline-block;
vertical-align: middle;
line-height: 1.9em;
}
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-destructive .oo-ui-buttonWidget-button {
/* Red text */
color: #d45353;
}
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-constructive .oo-ui-buttonWidget-button {
/* Green */
border: solid 1px #c3e59a;
background-color: #f0fbe1;
filter: progid:DXImageTransform.Microsoft.gradient(
GradientType=0,startColorstr=#f0fbe1, endColorstr=#c3e59a
);
background-image: -webkit-gradient(
linear, right top, right bottom, color-stop(0%,#f0fbe1), color-stop(100%,#c3e59a)
);
background-image: -webkit-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -moz-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -ms-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: -o-linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
background-image: linear-gradient(top, #f0fbe1 0%, #c3e59a 100%);
}
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-constructive .oo-ui-buttonWidget-button:hover,
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-constructive .oo-ui-buttonWidget-button:focus {
border-color: #a6cf74;
}
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-primary .oo-ui-buttonWidget-button {
/* Blue */
border: solid 1px #b0d9ee;
background-color: #eaf4fa;
filter: progid:DXImageTransform.Microsoft.gradient(
GradientType=0,startColorstr=#eaf4fa, endColorstr=#b0d9ee
);
background-image: -webkit-gradient(
linear, right top, right bottom, color-stop(0%,#eaf4fa), color-stop(100%,#b0d9ee)
);
background-image: -webkit-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -moz-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -ms-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: -o-linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
background-image: linear-gradient(top, #eaf4fa 0%, #b0d9ee 100%);
}
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-primary .oo-ui-buttonWidget-button:hover,
.oo-ui-pushButtonWidget.oo-ui-flaggableElement-primary .oo-ui-buttonWidget-button:focus {
border-color: #84b9d4;
}
/* OO.ui.SelectWidget */
.oo-ui-selectWidget {
list-style: none;
margin: 0;
padding: 0;
}
/* OO.ui.OptionWidget */
.oo-ui-optionWidget {
position: relative;
display: block;
border: none;
list-style: none;
margin: 0;
padding: 0.5em 2em 0.5em 3em;
cursor: pointer;
}
.oo-ui-optionWidget .oo-ui-labeledElement-label {
line-height: 1.5em;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.oo-ui-optionWidget-highlighted {
background-color: #e1f3ff;
}
.oo-ui-optionWidget-selected {
background-color: #a7dcff;
}
.oo-ui-optionWidget.oo-ui-widget-disabled {
cursor: default;
}
.oo-ui-optionWidget .oo-ui-optionWidget-icon {
position: absolute;
top: 50%;
left: 0.5em;
width: 2em;
height: 2em;
margin-top: -1em;
background-repeat: no-repeat;
background-position: center center;
}
/* OO.ui.OutlineItemWidget */
.oo-ui-outlineItemWidget {
position: relative;
padding: 0.75em 0.75em 0.75em 3.5em;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
font-size: 1.1em;
}
.oo-ui-outlineItemWidget-level-1 {
padding-left: 5em;
}
.oo-ui-outlineItemWidget-level-2 {
padding-left: 6.5em;
}
.oo-ui-outlineItemWidget.oo-ui-optionWidget-selected {
background-color: #a7dcff;
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}
.oo-ui-outlineItemWidget-level-0 .oo-ui-optionWidget-icon {
left: 1em;
}
.oo-ui-outlineItemWidget-level-1 .oo-ui-optionWidget-icon {
left: 2.5em;
}
.oo-ui-outlineItemWidget-level-2 .oo-ui-optionWidget-icon {
left: 4em;
}
/* OO.ui.OutlineControlsWidget */
.oo-ui-outlineControlsWidget {
height: 3em;
background-color: #fff;
}
.oo-ui-outlineControlsWidget-adders,
.oo-ui-outlineControlsWidget-movers {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: 3em;
padding: 0.5em;
}
.oo-ui-outlineControlsWidget-adders {
float: left;
}
.oo-ui-outlineControlsWidget-movers {
float: right;
}
.oo-ui-outlineControlsWidget-adders .oo-ui-iconButtonWidget {
float: left;
}
.oo-ui-outlineControlsWidget-movers .oo-ui-iconButtonWidget {
float: right;
}
.oo-ui-outlineControlsWidget-adders:not(:hover) .oo-ui-iconButtonWidget:not(:first-child) {
opacity: 0;
}
.oo-ui-outlineControlsWidget-adders:hover .oo-ui-iconButtonWidget:first-child {
opacity: 0.25;
cursor: default;
}
/* OO.ui.InputLabelWidget */
.oo-ui-inputLabelWidget {
padding: 0.5em 0;
}
/* OO.ui.TextInputWidget */
.oo-ui-textInputWidget {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 20em;
position: relative;
}
.oo-ui-textInputWidget input,
.oo-ui-textInputWidget input:focus[readonly],
.oo-ui-widget-disabled.oo-ui-textInputWidget input:focus,
.oo-ui-textInputWidget textarea,
.oo-ui-textInputWidget textarea:focus[readonly],
.oo-ui-widget-disabled.oo-ui-textInputWidget textarea:focus {
display: inline-block;
font-size: 1em;
font-family: sans-serif;
background-color: #f7f7f7;
border: solid 1px #ccc;
box-shadow: 0 0 0 white, inset 0 0.1em 0.2em #ddd;
padding: 0.5em;
border-radius: 0.25em;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
resize: none;
/* Animation */
-webkit-transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
-moz-transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
-o-transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
}
.oo-ui-textInputWidget-pending input,
.oo-ui-textInputWidget-pending textarea {
background-color: transparent;
}
.oo-ui-textInputWidget input:focus,
.oo-ui-textInputWidget textarea:focus {
outline: none;
border-color: #a7dcff;
box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
background-color: #fff;
}
.oo-ui-textInputWidget input[readonly],
.oo-ui-textInputWidget textarea[readonly] {
color: #777;
text-shadow: 0 1px 1px #fff;
}
.oo-ui-widget-disabled.oo-ui-textInputWidget input,
.oo-ui-widget-disabled.oo-ui-textInputWidget input:focus,
.oo-ui-widget-disabled.oo-ui-textInputWidget textarea,
.oo-ui-widget-disabled.oo-ui-textInputWidget textarea:focus {
color: #ccc;
text-shadow: 0 1px 1px #fff;
}
.oo-ui-textInputWidget-decorated input,
.oo-ui-textInputWidget-decorated textarea {
padding-left: 2em;
}
.oo-ui-textInputWidget-icon {
position: absolute;
top: 0;
left: 0;
width: 2em;
height: 100%;
background-position: right center;
background-repeat: no-repeat;
}
/* OO.ui.MenuWidget */
.oo-ui-menuWidget {
position: absolute;
background: #fff;
margin-top: -1px;
border: solid 1px #ccc;
border-radius: 0 0 0.25em 0.25em;
box-shadow: 0 0.15em 1em 0 rgba(0, 0, 0, 0.2);
}
.oo-ui-menuWidget input {
position: absolute;
width: 0;
height: 0;
overflow: hidden;
opacity: 0;
}
/* OO.ui.MenuItemWidget */
.oo-ui-menuItemWidget {
position: relative;
}
.oo-ui-menuItemWidget .oo-ui-optionWidget-icon {
display: none;
}
.oo-ui-menuItemWidget.oo-ui-optionWidget-selected .oo-ui-optionWidget-icon {
display: block;
}
.oo-ui-menuItemWidget.oo-ui-optionWidget-selected {
background-color: transparent;
}
.oo-ui-menuItemWidget.oo-ui-optionWidget-highlighted {
background-color: #e1f3ff;
}
/* OO.ui.MenuSectionItemWidget */
.oo-ui-menuSectionItemWidget {
padding: 0.33em 0.75em;
color: #888;
cursor: default;
}
/* OO.ui.PopupWidget */
.oo-ui-popupWidget-popup {
position: absolute;
overflow: hidden;
border: solid 1px #ccc;
border-radius: 0.25em;
background-color: #fff;
box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2);
}
.oo-ui-popupWidget-tail {
display: none;
}
.oo-ui-popupWidget-tailed .oo-ui-popupWidget-popup {
margin-top: 7px;
}
.oo-ui-popupWidget-tailed .oo-ui-popupWidget-tail {
display: block;
position: absolute;
/* @embed */
background-image: url(images/tail.svg);
background-repeat: no-repeat;
width: 15px;
height: 8px;
margin-left: -7px;
}
.oo-ui-popupWidget-transitioning .oo-ui-popupWidget-popup {
-webkit-transition: width 100ms, height 100ms, left 100ms;
-moz-transition: width 100ms, height 100ms, left 100ms;
-o-transition: width 100ms, height 100ms, left 100ms;
transition: width 100ms, height 100ms, left 100ms;
-webkit-transition-timing-function: ease-in-out;
-moz-transition-timing-function: ease-in-out;
-o-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
}
.oo-ui-popupWidget-head {
height: 2.5em;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.oo-ui-popupWidget-head .oo-ui-iconButtonWidget {
float: right;
margin: 0.25em;
}
.oo-ui-popupWidget-head .oo-ui-labeledElement-label {
float: left;
margin: 0.75em 1em;
cursor: default;
}
.oo-ui-popupWidget-body {
box-shadow: 0 0 0.66em rgba(0,0,0,0.25);
}
/* OO.ui.SearchWidget */
.oo-ui-searchWidget-query {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4em;
padding: 0 1em;
box-shadow: 0 0 0.5em rgba(0,0,0,0.2);
}
.oo-ui-searchWidget-query .oo-ui-textInputWidget {
width: 100%;
margin: 0.75em 0;
}
.oo-ui-searchWidget-results {
position: absolute;
top: 4em;
bottom: 0;
left: 0;
right: 0;
padding: 1em;
overflow-x: hidden;
overflow-y: auto;
line-height: 0;
}