mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
92c38eab85
Move all MW-specific files into the ve-mw directory, in preparation for moving them out into a separate repo. All MW-specific files were moved into a parallel directory structure in modules/ve-mw . Files with both generic and MW-specific things were split up. Files in ve/init/mw/ were moved to ve-mw/init/ rather than ve-mw/init/mw ; they're still named ve.init.mw.* but we should change that. Some of the test files for core classes had MW-specific test cases, so those were split up and the test runner was duplicated; we should refactor our tests to use data providers so we can add cases more easily. Split files: * ve.ce.Node.css * ve.ce.ContentBranchNode.test.js (MWEntityNode) * ve.ce.Document.test.js (some core test cases genericized) * ve.dm.InternalList.test.js (uses mwReference test document) * ve.dm.SurfaceFragment.test.js, ve.ui.FormatAction.test.js ** Made core tests use heading instead of mwHeading ** Updated core tests because normal headings don't break out of lists ** Moved test runners into ve.test.utils.js * ve.ui.Icons-*.css * ve.ui.Dialog.css (MW parts into ve.ui.MWDialog.css) * ve.ui.Tool.css * ve.ui.Widget.css (move ve-ui-rtl and ve-ui-ltr to ve.ui.css) ve.dm.Converter.test.js: Moved runner functions into ve.test.utils.js ve.dm.example.js: * Refactored createExampleDocument so mwExample can use it * Removed wgExtensionAssetsPath detection, moved into mw-preload.js * Genericized withMeta example document (original version copied to mwExample) * Moved references example document to mwExample ve.dm.mwExample.js: * Move withMeta and references example documents from ve.dm.example.js * Add createExampleDocument function ve-mw/test/index.php: Runner for MW-specific tests only ve-mw/test/mw-preload.js: Sets VE_TESTDIR for Special:JavaScriptTest only ve.ui.Window.js: * Remove magic path interpolation in addLocalStyleSheets() * Pass full(er) paths to addLocalStyleSheets(), here and in subclasses ve.ui.MWDialog.js: Subclass of Dialog that adds MW versions of stylesheets ve.ui.MW*Dialog.js: * Subclass MWDialog rather than Dialog * Load both core and MW versions of stylesheets that have both ve.ui.PagedDialog.js: Converted to a mixin rather than an abstract base class * Don't inherit ve.ui.Dialog * Rather than overriding initialize(), provide initializePages() which the host class is supposed to call from its initialize() * Rename onOutlineSelect to onPageOutlineSelect ve.ui.MWMetaDialog.js, ve.ui.MWTransclusionDialog.js: * Use PagedDialog as a mixin rather than a base class, inherit MWDialog bullet-icon.png: Unused, deleted Stuff we should do later: * Refactor tests to use data providers * Write utility function for SVG compat check * Separate omnibus CSS files such as ve.ui.Widget.css * Separate omnibus RL modules * Use icon classes in ViewPageTarget Change-Id: I1b28f8ba7f2d2513e5c634927a854686fb9dd5a5
189 lines
3.9 KiB
CSS
189 lines
3.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
|
|
*/
|
|
|
|
/* ve.ce.DocumentNode */
|
|
|
|
.ve-ce-documentNode {
|
|
cursor: text;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Prevent focus outline on editor */
|
|
.ve-ce-documentNode[contenteditable="true"]:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* ve.ce.ProtectedNode */
|
|
|
|
.ve-ce-protectedNode,
|
|
.ve-ce-protectedNode * {
|
|
position: relative !important;
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
bottom: 0 !important;
|
|
right: 0 !important;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.ve-ce-protectedNode::-moz-selection,
|
|
.ve-ce-protectedNode *::-moz-selection {
|
|
background: transparent;
|
|
}
|
|
|
|
.ve-ce-protectedNode-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;
|
|
}
|
|
|
|
.ve-ce-protectedNode-phantom {
|
|
position: absolute;
|
|
background-color: rgba(104,171,255,0.1);
|
|
box-shadow: inset 0 0 0 1px #68abff;
|
|
cursor: default;
|
|
}
|
|
|
|
/* ve.ce.FocusableNode */
|
|
|
|
.ve-ce-focusableNode-highlight {
|
|
background: #6da9f7;
|
|
position: absolute;
|
|
}
|
|
|
|
/* ve.ce.ResizableNode */
|
|
|
|
.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;
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
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;
|
|
}
|
|
|
|
/* ve.ce.RelocatableNode */
|
|
|
|
.ve-ce-relocatableNode-marker {
|
|
cursor: move;
|
|
position: absolute;
|
|
}
|
|
|
|
.ve-ce-relocatableNode-marker.relocating {
|
|
background: rgba(0,0,0,1);
|
|
}
|
|
|
|
/* ve.ce.ImageNode */
|
|
|
|
.ve-ce-imageNode {
|
|
cursor: default;
|
|
}
|
|
|
|
/* ve.ce.AlienNode */
|
|
|
|
/* Fix weird Chrome native selection involving floated elements */
|
|
.ve-ce-alienBlockNode:before,
|
|
.ve-ce-alienBlockNode:after {
|
|
content: '';
|
|
}
|
|
|
|
.ve-ce-alienBlockNode {
|
|
display: block;
|
|
}
|
|
|
|
.ve-ce-alienInlineNode {
|
|
display: inline;
|
|
}
|
|
|
|
.ve-ce-alienNode-phantom {
|
|
background-color: #C3E59A;
|
|
background-image: -ms-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
|
|
background-image: -webkit-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
|
|
background-image: -moz-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px);
|
|
background-image: repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
|
|
background-size: 14px 14px;
|
|
box-shadow: none;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ve.ce.BranchNode */
|
|
|
|
.ve-ce-branchNode-blockSlug {
|
|
display: block;
|
|
}
|
|
|
|
/* ve.ce.PreformattedNode */
|
|
|
|
pre.ve-ce-branchNode {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
/* Hack for empty headings and paragraphs; can't use min-height because of IE */
|
|
|
|
.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==');
|
|
}
|
|
|
|
/* Emulate the first paragraph in each list item being unwrapped */
|
|
|
|
/* TODO use CSS class for wrapper paragraph */
|
|
li.ve-ce-branchNode p.ve-ce-branchNode:first-child {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|