mediawiki-extensions-Visual.../modules/ve/ui/styles/ve.ui.Surface.css
Timo Tijhof 077e21867e Kranitor #3: jQuerlyfornication ft. The Cascaders
* Classicifation (JS)
 Use addClass instead of attr( 'class' ) whenever possible.
 addClass will manipulate the properties directly instead of
 (re-)setting an attribute which (most) browsers then sync
 with the properties.

 Difference between:
 elem.className
 and
 elem.setAttribute( 'class', .. );

 Just like .checked, .value, .disabled and other interactive
 properties, the HTML attributes should only be used for initial
 values from the html document. When in javascript, only set
 properties. Attributes are either ignored or slow.

* Styling (JS)
 Use .css() instead of attr( 'style' ).

 Again, setting properties instead of attributes is much faster,
 easier and safer. And this way it takes care of cross-browser
 issues where applicable, and less prone to error due to dealing
 with key-value pairs instead of css strings.

 Difference between:
 elem.style.foo = 'bar';
 and
 elem.setAttribute( 'style', 'foo: bar;' );

* Finding (JS)
 Use .find( 'foo bar' ) instead of .find( 'foo' ).find( 'bar' ).
 It is CSS!

* Vendor prefixes (CSS)
 It is important to always list newer (standards-compliant) versions
 *after* the older/prefixed variants.

 See also http://css-tricks.com/ordering-css3-properties/

 So the following three:
 -webkit-gradient (Chrome, Safari 4)
 -webkit-linear-gradient (Chrome 10, Safari 5+)
 linear-gradient (CSS3 standard)

 ... must be in that order.

 Notes:
  - "-moz-opacity" is from before Mozilla 1.7 (Firefox < 0.8)
    Has not been renamed to "opacity" since Firefox 0.9.
  - Removed redundant "-moz-opacity"
  - Added "filter: alpha(opacity=**);" where missing
  - Fixed order of css3 properties (old to new)
  - Add standardized css3 versions where missing
    (some 'border-radius' groups didn't have the non-prefixed version)
  - Spacing
  - @embed
  - Shorten hex colors where possible (#dddddd -> #ddd)
    $ ack '#([0-9a-f])\1{5}' --css
    $ ack '#([0-9a-f])\1{2};' --css

Change-Id: I386fedb9058c2567fd0af5f55291e9859a53329d
2012-07-28 13:05:57 -07:00

299 lines
5.1 KiB
CSS

/**
* VisualEditor user interface Surface styles.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.es-toolbar {
border-bottom: solid 1px #ccc;
position: relative;
/* -webkit-border-radius: 0.25em;
-moz-border-radius: 0.25em;
-o-border-radius: 0.25em;
border-radius: 0.25em;
*/
/* @embed */
background-image: url(images/fade-up.png);
background-position: bottom left;
background-repeat: repeat-x;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.es-toolbar-wrapper.float .es-toolbar {
top: 0;
position: fixed;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
z-index: 100;
border-top: none;
}
.es-toolbar-wrapper.bottom .es-toolbar {
position: absolute;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
z-index: 100;
border-top: none;
}
.es-toolbar-shadow {
/* @embed */
background-image: url(images/toolbar-shadow.png);
background-position: top left;
background-repeat: repeat-x;
position: absolute;
bottom: -9px;
height: 9px;
width: 100%;
pointer-events: none;
-webkit-transition: opacity 500ms ease-in-out;
-moz-transition: opacity 500ms ease-in-out;
-o-transition: opacity 500ms ease-in-out;
transition: opacity 500ms ease-in-out;
filter: alpha(opacity=12);
opacity: 0.125;
}
.es-toolbar.float .es-toolbar-shadow {
filter: alpha(opacity=50);
opacity: 0.5;
}
.es-showData .es-editor {
border-right: solid 1px #ccc;
margin: 0;
padding: 0;
}
.es-showData .es-visual {
margin: 0;
padding: 0;
float: left;
width: 50%;
overflow: hidden;
margin-left: -1px;
}
.es-panels {
display: none;
}
.es-showData .es-panels {
display: block;
float: right;
width: 50%;
overflow: hidden;
}
.es-panel {
margin: 0;
padding: 1em;
display: none;
}
.es-code {
white-space: pre-wrap;
font-family: monospace, "Courier New";
font-size: 0.8em;
}
.mediawiki .es-code {
font-size: 1em;
}
.es-render {
padding: 1em;
}
.es-history {
line-height: 1.5em;
padding: 0;
}
/* General MediaWiki Styles */
.es-render ul {
line-height: 1.5em;
list-style-type: square;
margin: 0.3em 0 0 1.5em;
padding: 0;
/* @embed */
list-style-image: url(images/bullet-icon.png);
}
.es-render ol {
line-height: 1.5em;
margin: 0.3em 0 0 3.2em;
padding: 0;
list-style-image: none;
}
.es-render li {
margin-bottom: .1em;
}
.mediawiki .es-menuView {
font-size: 0.9em;
}
.es-toolbar .es-toolbarGroups {
float: left;
}
.es-modes {
float: right;
padding: 0.25em;
}
.es-modes-button {
display: inline-block;
border: solid 1px transparent;
-webkit-border-radius: 0.125em;
-moz-border-radius: 0.125em;
-o-border-radius: 0.125em;
border-radius: 0.125em;
cursor: pointer;
vertical-align: top;
padding: 0.25em;
width: 22px;
height: 22px;
margin-right: 0.125em;
}
.es-modes-button:before {
content: " ";
position: absolute;
display: block;
height: 22px;
width: 22px;
}
.es-modes-button:hover {
border-color: #eee;
}
.es-modes-button:active,
.es-modes-button-down {
border-color: #ddd;
/* @embed */
background-image: url(images/fade-down.png);
background-position: top left;
background-repeat: repeat-x;
-webkit-box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.07);
-moz-box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.07);
box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.07);
}
.es-mode-wikitext:before {
/* @embed */
background-image: url(images/wikitext.png);
}
.es-mode-json:before {
/* @embed */
background-image: url(images/json.png);
}
.es-mode-html:before {
/* @embed */
background-image: url(images/html.png);
}
.es-mode-render:before {
/* @embed */
background-image: url(images/render.png);
}
.es-mode-history:before {
/* @embed */
background-image: url(images/history.png);
}
.es-mode-help:before {
/* @embed */
background-image: url(images/help.png);
}
.es-panel-history div {
border-bottom: solid 1px #ddd;
padding: 0.5em 0;
color: #666;
background-color: #f9f9f9;
}
.es-panel-history div.es-panel-history-active {
color: #000;
background-color: #fff;
}
#es-docs {
margin: 0 2em 1em 2em;
}
#es-docs-label {
display: inline-block;
}
#es-docs-list {
list-style: none;
margin: 0;
padding: 0;
display: inline-block;
}
.es-docs-listItem {
list-style: none;
margin: 0 0.75em 0 0;
padding: 0;
display: inline-block;
}
.es-help-title {
font-size: 1.5em;
}
.es-help-shortcuts-title {
margin: 1em 0 0.5em 0;
padding: 0;
font-size: 1.25em;
}
.es-help-shortcut {
margin-bottom: 1em;
font-size: 0.8em;
}
.es-help-keys {
display: inline-block;
margin-right: 0.5em;
}
.es-help-key {
display: inline-block;
padding: 0.33em 0.5em;
min-width: 1em;
text-align: center;
cursor: default;
border: solid 1px #333;
border-top-color: #666;
border-bottom-color: #000;
background-color: #333;
color: #fff;
-webkit-border-radius: 0.25em;
-moz-border-radius: 0.25em;
-o-border-radius: 0.25em;
border-radius: 0.25em;
-webkit-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5);
}
.es-help-key-or {
color: #999;
}