mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 17:36:35 +00:00
babaa4118d
Introduction of fake selection for single focused nodes. This change specifically makes the selection much nicer in appearance for Chrome users selecting floated FocusableNodes (block images) for example. Added ve-ce-surface-highlights DOM element to contain styled highlight elements. Made adjustments to getSelectionRect to return fake selection bounds if necessary. Replaced old uses of showSelection with model.change(). Change-Id: I96e66567cdce6455ef3eb77568e72f23140448ff
84 lines
1.5 KiB
CSS
84 lines
1.5 KiB
CSS
/*!
|
|
* VisualEditor ContentEditable Surface styles.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
.ve-ce-surface {
|
|
overflow: hidden;
|
|
font-size: 1em; /* to look more like MediaWiki use: 0.8em */;
|
|
}
|
|
|
|
.ve-ce-surface-textarea {
|
|
position: absolute;
|
|
z-index: -1;
|
|
filter: alpha(opacity=0);
|
|
opacity: 0;
|
|
color: white;
|
|
background-color: #fff;
|
|
border: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
width: 1px;
|
|
}
|
|
|
|
.ve-ce-surface-textarea:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.ve-ce-surface-cursor {
|
|
position: absolute;
|
|
background-color: #000;
|
|
width: 1px;
|
|
display: none;
|
|
}
|
|
|
|
/* @noflip */
|
|
.ve-ce-surface-phantoms {
|
|
left: 0;
|
|
opacity: 0.75;
|
|
position: absolute;
|
|
top: 0;
|
|
}
|
|
|
|
/* @noflip */
|
|
.ve-ce-surface-highlights {
|
|
left: 0;
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
top: 0;
|
|
}
|
|
|
|
.ve-ce-surface-paste {
|
|
display: none;
|
|
height: 1px;
|
|
left: 0;
|
|
filter: alpha(opacity=0);
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
position: fixed;
|
|
top: 0;
|
|
width: 1px;
|
|
}
|
|
|
|
.ve-ce-surface-paste * {
|
|
height: 1px !important;
|
|
width: 1px !important;
|
|
}
|
|
|
|
/* MediaWiki PHP Parser does not wrap text inside image captions in <p> but we do (cause we have to).
|
|
* Let's make those <p> looks like they are not there by proper CSS styling.
|
|
*/
|
|
/*csslint overqualified-elements:false */
|
|
.ve-ce-surface .thumbcaption p.ve-ce-generated-wrapper {
|
|
display: inline;
|
|
padding: 0;
|
|
line-height: inherit;
|
|
}
|
|
|
|
.ve-ce-surface .thumbcaption .ve-ce-branchNode-slug {
|
|
display: none;
|
|
}
|