mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-12-12 06:15:27 +00:00
7365cc9a96
Line numbering will be unconditionally enabled. Bug: T267911 Change-Id: I9eb07dd433e352ed5cea5dc978d469ee2ea6f347
110 lines
2.3 KiB
Plaintext
110 lines
2.3 KiB
Plaintext
@import 'resources/lib/ooui/wikimedia-ui-base.less';
|
|
|
|
.ve-init-mw-desktopArticleTarget {
|
|
.CodeMirror {
|
|
height: auto;
|
|
z-index: -1;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
pointer-events: none;
|
|
background: transparent;
|
|
|
|
// Core VE default padding
|
|
padding: 1.5em;
|
|
|
|
// Skin specific paddings
|
|
.skin-vector & {
|
|
/* stylelint-disable-next-line unit-blacklist */
|
|
padding: 0 1rem;
|
|
|
|
@media screen and ( min-width: 982px ) {
|
|
.skin-vector-legacy& {
|
|
/* stylelint-disable-next-line unit-blacklist */
|
|
padding: 0 1.5rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.skin-minerva &,
|
|
.skin-monobook & {
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
.CodeMirror-lines,
|
|
.CodeMirror pre.CodeMirror-line,
|
|
.CodeMirror pre.CodeMirror-line-like {
|
|
padding: 0;
|
|
}
|
|
|
|
.CodeMirror-scroll {
|
|
margin-right: 0;
|
|
overflow: auto !important; /* stylelint-disable-line declaration-no-important */
|
|
}
|
|
|
|
.CodeMirror-sizer {
|
|
border-right: 0;
|
|
}
|
|
|
|
.CodeMirror-selected {
|
|
display: none;
|
|
}
|
|
|
|
.CodeMirror pre.cm-mw-section-1,
|
|
.CodeMirror pre.cm-mw-section-2 {
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
}
|
|
|
|
// Ensure surfaces are using identical font rules
|
|
.CodeMirror-code,
|
|
.CodeMirror-code *,
|
|
.ve-ui-mwWikitextSurface .ve-ce-paragraphNode {
|
|
// The following are already set by mw-editfont-monospace on the parent: font-size, font-family
|
|
line-height: 1.5em;
|
|
word-wrap: break-word;
|
|
white-space: pre-wrap;
|
|
word-break: normal;
|
|
-webkit-hyphens: manual;
|
|
-moz-hyphens: manual;
|
|
-ms-hyphens: manual;
|
|
hyphens: manual;
|
|
-webkit-font-variant-ligatures: contextual;
|
|
font-variant-ligatures: contextual;
|
|
|
|
// Monospace fonts can change width when bold
|
|
// stylelint-disable-next-line declaration-no-important
|
|
font-weight: normal !important;
|
|
}
|
|
|
|
.CodeMirror-gutters {
|
|
background-color: transparent;
|
|
border-right: 0;
|
|
}
|
|
.CodeMirror-linenumber {
|
|
color: @wmui-color-base70;
|
|
}
|
|
.CodeMirror-linenumber-padding {
|
|
// Create a 8px padding between the line numbers and content.
|
|
width: 4px;
|
|
}
|
|
}
|
|
|
|
.ve-ce-documentNode-codeEditor-hide {
|
|
opacity: 0.4;
|
|
|
|
&::selection,
|
|
& *::selection {
|
|
background: #6da9f7 !important; /* stylelint-disable-line declaration-no-important */
|
|
}
|
|
}
|
|
|
|
.ve-ce-documentNode-codeEditor-webkit-hide {
|
|
-webkit-text-fill-color: transparent;
|
|
}
|