mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
ec912dc2d1
ve.ui.Widget.css * Adjust menu up a few pixels to match other uses of ve.ui.MenuWidget (the format drop down) ve.ui.LinkInspector.js * Moved the form value initialization to a timeout that fires well after the animation of the inspector - this is only important because the first element has a menu that pops up and the menu was rendering in the wrong location ve.ui.Frame.js * Added reference to frame within this.$$ by passing it to get$$ ve.ui.Inspector.js * Removed auto-focus on open from inspector base class - this will be done in a more specific and controlled way instead ve.ui.js * Added optional frame argument to get$$ so that it's easy to get the frame from any $$ that's bound to an iframe document ve.ui.Window.js * Removed duplicate static member assignments * Added auto-focus on the window's frame before calling onOpen * Added auto-blur of anything focused within the iframe after calling onClose ve.ui.MWLinkTargetInputWidget.js * Auto-highlight the selected item when populating a menu so that pressing enter always keeps the currently selected item selected ve.ui.TextInputMenuWidget.js * Take the frame's position into account when positioning a menu below an input Change-Id: I334f7db29af6b821bcfc8dc3c0ccba2636d4d9b1
277 lines
7 KiB
CSS
277 lines
7 KiB
CSS
/*!
|
|
* VisualEditor UserInterface Widget styles.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/* ve.ui.IconButtonWidget */
|
|
|
|
.ve-ui-iconButtonWidget {
|
|
width: 2em;
|
|
height: 2em;
|
|
background-position: center center;
|
|
background-repeat: no-repeat;
|
|
cursor: pointer;
|
|
opacity: 0.8;
|
|
-webkit-transition: opacity 100ms;
|
|
-moz-transition: opacity 100ms;
|
|
-ms-transition: opacity 100ms;
|
|
-o-transition: opacity 100ms;
|
|
transition: opacity 100ms;
|
|
}
|
|
|
|
.ve-ui-iconButtonWidget:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ve.ui.ButtonWidget */
|
|
|
|
.ve-ui-buttonWidget {
|
|
display: inline-block;
|
|
height: 1.8em;
|
|
margin: 0.1em 0;
|
|
padding: 0.25em 0.75em;
|
|
border-radius: 0.3em;
|
|
vertical-align: top;
|
|
color: #333;
|
|
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;
|
|
font-size: 1em;
|
|
cursor: pointer;
|
|
-webkit-touch-callout: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
|
|
/* Animation */
|
|
-webkit-transition: border-color 100ms;
|
|
-moz-transition: border-color 100ms;
|
|
-ms-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%);
|
|
}
|
|
|
|
.ve-ui-buttonWidget:hover {
|
|
border-color: #aaa;
|
|
}
|
|
|
|
.ve-ui-buttonWidget:active {
|
|
border-color: #ddd;
|
|
box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, 0.07);
|
|
color: black;
|
|
}
|
|
|
|
.ve-ui-widget-disabled.ve-ui-buttonWidget,
|
|
.ve-ui-widget-disabled.ve-ui-buttonWidget:active {
|
|
filter: alpha(opacity=25);
|
|
opacity: 0.5;
|
|
cursor: default;
|
|
box-shadow: none;
|
|
color: #333;
|
|
}
|
|
|
|
.ve-ui-widget-disabled.ve-ui-buttonWidget:hover {
|
|
border-color: #ccc;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.ve-ui-buttonWidget-label {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
line-height: 1.9em;
|
|
}
|
|
|
|
.ve-ui-flaggableWidget-destructive.ve-ui-buttonWidget {
|
|
/* Red text */
|
|
color: #d45353;
|
|
}
|
|
|
|
.ve-ui-flaggableWidget-constructive.ve-ui-buttonWidget {
|
|
/* 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%);
|
|
}
|
|
|
|
.ve-ui-flaggableWidget-constructive.ve-ui-buttonWidget:hover {
|
|
border-color: #a6cf74;
|
|
}
|
|
|
|
.ve-ui-flaggableWidget-primary.ve-ui-buttonWidget {
|
|
/* 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%);
|
|
}
|
|
|
|
.ve-ui-flaggableWidget-primary.ve-ui-buttonWidget:hover {
|
|
border-color: #84b9d4;
|
|
}
|
|
|
|
/* ve.ui.TextInputWidget */
|
|
|
|
.ve-ui-textInputWidget input,
|
|
.ve-ui-textInputWidget input:focus[readonly],
|
|
.ve-ui-widget-disabled.ve-ui-textInputWidget input: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;
|
|
|
|
/* Animation */
|
|
-webkit-transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
|
|
-moz-transition: border-color 200ms, box-shadow 200ms, background-color 200ms;
|
|
-ms-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;
|
|
}
|
|
|
|
.ve-ui-textInputWidget input:focus {
|
|
outline: none;
|
|
border-color: #a7dcff;
|
|
box-shadow: 0 0 0.3em #a7dcff, 0 0 0 white;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.ve-ui-textInputWidget input[readonly] {
|
|
color: #777;
|
|
text-shadow: 0 1px 1px #fff;
|
|
}
|
|
|
|
.ve-ui-widget-disabled.ve-ui-textInputWidget input,
|
|
.ve-ui-widget-disabled.ve-ui-textInputWidget input:focus {
|
|
color: #ccc;
|
|
text-shadow: 0 1px 1px #fff;
|
|
}
|
|
|
|
/* ve.ui.MenuWidget */
|
|
|
|
.ve-ui-menuWidget {
|
|
position: absolute;
|
|
background: #FFFFFF;
|
|
margin-top: -1px;
|
|
font-size: 0.8em;
|
|
z-index: 101;
|
|
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);
|
|
}
|
|
|
|
.ve-ui-menuWidget-groups {
|
|
margin: 0.5em 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.ve-ui-menuWidget-group {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.ve-ui-menuWidget-group-label {
|
|
padding: 0.33em 0.75em;
|
|
color: #888;
|
|
}
|
|
|
|
.ve-ui-menuWidget-items {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.ve-ui-menuWidget input {
|
|
position: absolute;
|
|
width: 0;
|
|
height: 0;
|
|
overflow: hidden;
|
|
opacity: 0;
|
|
}
|
|
|
|
/* ve.ui.MenuItemWidget */
|
|
|
|
.ve-ui-menuItemWidget {
|
|
display: block;
|
|
padding: 0.5em 2em 0.5em 3em;
|
|
border: none;
|
|
margin: 0;
|
|
cursor: pointer;
|
|
background-position: 1em center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.ve-ui-menuItemWidget-label {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ve-ui-menuItemWidget-highlighted {
|
|
background-color: #b3d6f6;
|
|
}
|
|
|
|
/* ve.ui.MWLinkTargetInputWidget */
|
|
|
|
.ve-ui-mwLinkTargetInputWidget-pending input {
|
|
background-image: url(images/pending.gif);
|
|
}
|
|
|
|
.ve-ui-mwLinkTargetInputWidget-menu.ve-ui-menuWidget {
|
|
width: 20em;
|
|
margin-top: -7px;
|
|
}
|
|
|
|
.ve-ui-mwLinkTargetInputWidget-menu .ve-ui-menuWidget-item {
|
|
padding: 0.33em 1.25em;
|
|
color: #0645AD;
|
|
}
|
|
|
|
.ve-ui-mwLinkTargetInputWidget-menu .ve-ui-menuWidget-group[rel=newPage] .ve-ui-menuWidget-item-label {
|
|
color: #BA0000;
|
|
}
|
|
|
|
.ve-ui-mwLinkTargetInputWidget-menu .ve-ui-menuWidget-group[rel=existingPage] .ve-ui-menuWidget-item-label,
|
|
.ve-ui-mwLinkTargetInputWidget-menu .ve-ui-menuWidget-group[rel=matchingPage] .ve-ui-menuWidget-item-label,
|
|
.ve-ui-mwLinkTargetInputWidget-menu .ve-ui-menuWidget-group[rel=externalLink] .ve-ui-menuWidget-item-label {
|
|
color: #0645AD;
|
|
}
|