mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
b3cd473f33
Actually really resizing the image Show bounding box on mouseover with 4 handles. Bounding box is resizable. Image resizes to match bounding box on mouse up. Change-Id: I1f3dac64eb86dd1f258937e4915af101b3ac19d8
130 lines
2.4 KiB
CSS
130 lines
2.4 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;
|
|
}
|
|
|
|
/* 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;
|
|
border: solid 1px rgba(0,0,0,0.25);
|
|
z-index: 10000;
|
|
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;
|
|
}
|