mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
f8621f9ef8
* Only place them in a high z-index while resizing so they don't render above dialogs and menus * Add resize transition ve.ce.ImageNode.js * Switch from element attributes to CSS for setting dimensions ve.ce.Node.css * Add resizing class for resizable nodes for z-index * Add transitioning class for resizable nodes for transitions * Switch from border to inset box-shadow to not affect handle position calculation ve.ce.ResizableNode.js * Add/remove resizing class while resizing * Switch from using $image to $resiable to make the class useful for non-image node * Enable transition and set new dimensions before transaction processing which will cause re-rendering) * Delay transaction processing for resize until after transition is complete * Add hiding of context menu on resize start ve.ce.Surface.js * Add getSurface method so we can get to the context menu Change-Id: I4667e394d0af4a80b651c2a0f6d11d30e196bf60
143 lines
2.9 KiB
CSS
143 lines
2.9 KiB
CSS
/*!
|
|
* VisualEditor ContentEditable Node styles.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/* Alien styling */
|
|
|
|
.ve-ce-alienNode,
|
|
.ve-ce-alienNode * {
|
|
position: relative !important;
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
bottom: 0 !important;
|
|
right: 0 !important;
|
|
}
|
|
|
|
.ve-ce-imageNode {
|
|
cursor: default;
|
|
}
|
|
|
|
.ve-ce-alienNode {
|
|
z-index: 0;
|
|
}
|
|
|
|
.ve-ce-resizableNode-transitioning {
|
|
-webkit-transition: width 100ms ease-in-out, height 100ms ease-in-out;
|
|
-moz-transition: width 100ms ease-in-out, height 100ms ease-in-out;
|
|
-ms-transition: width 100ms ease-in-out, height 100ms ease-in-out;
|
|
-o-transition: width 100ms ease-in-out, height 100ms ease-in-out;
|
|
transition: width 100ms ease-in-out, height 100ms ease-in-out;
|
|
}
|
|
|
|
.ve-ce-resizableNode-handles-resizing {
|
|
z-index: 10000;
|
|
}
|
|
|
|
/* Alien blocks and their contents are unselectable / unclickable */
|
|
.ve-ce-alienBlockNode,
|
|
.ve-ce-alienBlockNode * {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.ve-ce-alienBlockNode::-moz-selection,
|
|
.ve-ce-alienBlockNode *::-moz-selection {
|
|
background: transparent;
|
|
}
|
|
|
|
.ve-ce-node-shield {
|
|
position: absolute !important;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
background-color: transparent !important;
|
|
-webkit-user-select: auto;
|
|
-moz-user-select: element;
|
|
-ms-user-select: element;
|
|
user-select: element;
|
|
}
|
|
|
|
/* Fix weird Chrome native selection involving floated elements */
|
|
.ve-ce-alienBlockNode:before,
|
|
.ve-ce-alienBlockNode:after {
|
|
content: '';
|
|
}
|
|
|
|
.ve-ce-alienBlockNode,
|
|
.ve-ce-MWtemplateBlockNode, {
|
|
display: block;
|
|
}
|
|
|
|
.ve-ce-alienInlineNode,
|
|
.ve-ce-MWtemplateInlineNode {
|
|
display: inline;
|
|
}
|
|
|
|
.ve-ce-slugBlock {
|
|
display: block;
|
|
}
|
|
|
|
.ve-ce-branchNode h1:empty:before,
|
|
.ve-ce-branchNode h2:empty:before,
|
|
.ve-ce-branchNode h3:empty:before,
|
|
.ve-ce-branchNode h4:empty:before,
|
|
.ve-ce-branchNode h5:empty:before,
|
|
.ve-ce-branchNode h6:empty:before,
|
|
.ve-ce-branchNode p:empty:before {
|
|
content: url('data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
|
|
}
|
|
|
|
li.ve-ce-branchNode p.ve-ce-branchNode:first-child {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.ve-ce-resizableNode-handles {
|
|
position: absolute;
|
|
box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ve-ce-resizableNode-handles div {
|
|
position: absolute;
|
|
width: 0.66em;
|
|
height: 0.66em;
|
|
border: solid 0.125em #fff;
|
|
background-color: #333;
|
|
box-shadow: 0 0.1em 0.2em rgba(0,0,0,0.75);
|
|
border-radius: 1em;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ve-ce-resizableNode-nwHandle {
|
|
cursor: nw-resize;
|
|
left: -0.33em;
|
|
top: -0.33em;
|
|
}
|
|
|
|
.ve-ce-resizableNode-neHandle {
|
|
cursor: ne-resize;
|
|
right: -0.33em;
|
|
top: -0.33em;
|
|
}
|
|
|
|
.ve-ce-resizableNode-swHandle {
|
|
cursor: sw-resize;
|
|
bottom: -0.33em;
|
|
left: -0.33em;
|
|
}
|
|
|
|
.ve-ce-resizableNode-seHandle {
|
|
cursor: se-resize;
|
|
bottom: -0.33em;
|
|
right: -0.33em;
|
|
}
|