| 1 |
@import 'mediawiki.mixins'; |
| 2 |
@import 'mediawiki.skin.variables.less'; |
| 3 |
|
| 4 |
/* stylelint-disable selector-class-pattern */ |
| 5 |
|
| 6 |
.wikiEditor-ui-toolbar .group-codeeditor-style { |
| 7 |
border-right: 0; |
| 8 |
} |
| 9 |
|
| 10 |
.wikiEditor-ui-toolbar:not( .codeEditor-ui-toolbar ) .group-codeeditor-format, |
| 11 |
.wikiEditor-ui-toolbar:not( .codeEditor-ui-toolbar ) .group-codeeditor-style, |
| 12 |
.codeEditor-ui-toolbar .group-insert.group, |
| 13 |
.codeEditor-ui-toolbar .group-format.group, |
| 14 |
.codeEditor-ui-toolbar .tabs span.tab-advanced, |
| 15 |
.codeEditor-ui-toolbar .tabs span.tab-characters, |
| 16 |
.codeEditor-ui-toolbar .tabs span.tab-help, |
| 17 |
.codeEditor-ui-toolbar .sections { |
| 18 |
display: none; |
| 19 |
} |
| 20 |
|
| 21 |
.wikiEditor-ui .ace_editor { |
| 22 |
/* Same as mw-editfont-monospace, repeated for higher specificity */ |
| 23 |
font-size: 13px; |
| 24 |
font-family: monospace, monospace; |
| 25 |
} |
| 26 |
|
| 27 |
.ace_editor textarea, |
| 28 |
.ace_editor input { |
| 29 |
/* Inherit directionality from editor, not sitedir (T186329) */ |
| 30 |
direction: inherit; |
| 31 |
} |
| 32 |
|
| 33 |
.codeEditor-status { |
| 34 |
clear: both; |
| 35 |
width: 100%; |
| 36 |
background-color: @background-color-neutral-subtle; |
| 37 |
border-top: 1px solid @border-color-subtle; |
| 38 |
display: table; |
| 39 |
} |
| 40 |
|
| 41 |
.codeEditor-status .codeEditor-status-worker-cell.ace_gutter-cell { |
| 42 |
position: relative; |
| 43 |
background-position: 0 center; |
| 44 |
} |
| 45 |
|
| 46 |
.codeEditor-status-worker { |
| 47 |
padding: 0 0.3em; |
| 48 |
user-select: none; |
| 49 |
cursor: pointer; |
| 50 |
display: table-cell; |
| 51 |
} |
| 52 |
|
| 53 |
.codeEditor-status-message { |
| 54 |
border-left: 1px solid @border-color-subtle; |
| 55 |
border-right: 1px solid @border-color-subtle; |
| 56 |
padding: 0 0.3em; |
| 57 |
width: 100%; |
| 58 |
display: table-cell; |
| 59 |
} |
| 60 |
|
| 61 |
.codeEditor-status-line { |
| 62 |
padding: 0 0.3em; |
| 63 |
text-align: right; |
| 64 |
white-space: nowrap; |
| 65 |
display: table-cell; |
| 66 |
} |
| 67 |
|
| 68 |
/* Hide vanilla MediaWiki's "Editing help" link, as we provide it in the toolbar */ |
| 69 |
/* Copied from the same code in WikiEditor */ |
| 70 |
.client-js .editButtons { |
| 71 |
.editHelp { |
| 72 |
display: none; |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
.client-js { |
| 77 |
.mw-editform { |
| 78 |
/* Disable margin collapse, e.g. with messages boxes */ |
| 79 |
padding: 0.05px; |
| 80 |
|
| 81 |
> #wpTextbox1 { /* stylelint-disable-line selector-max-id */ |
| 82 |
/* Toolbar height + padding + bottom border = 26 + 2*3 + 1 */ |
| 83 |
margin-top: 33px; |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
> .codeeditor-loading { |
| 88 |
.mw-editform { |
| 89 |
/* Copied from ext.wikiEditor.styles to avoid FOUC while loading (T73015) */ |
| 90 |
> #wpTextbox1 { /* stylelint-disable-line selector-max-id */ |
| 91 |
/* Unless there are <10 lines of code, the gutter will be 2 characters wide on the first page */ |
| 92 |
padding-left: 53px !important; /* stylelint-disable-line declaration-no-important */ |
| 93 |
margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */ |
| 94 |
width: 100% !important; /* stylelint-disable-line declaration-no-important */ |
| 95 |
} |
| 96 |
|
| 97 |
/* Try to style textarea like the Ace editor to avoid movement when switching */ |
| 98 |
#wpTextbox1 { /* stylelint-disable-line selector-max-id */ |
| 99 |
/* Reserve space for CodeEditor status bar */ |
| 100 |
padding-bottom: 22px; |
| 101 |
margin-left: 49px; |
| 102 |
width: calc( 100% - 49px ); |
| 103 |
padding-left: 4px; |
| 104 |
padding-top: 0; |
| 105 |
line-height: 20px; |
| 106 |
white-space: pre; |
| 107 |
} |
| 108 |
} |
| 109 |
} |
| 110 |
} |