Debian Codegraph @

extensions/WikiEditor/modules/realtimepreview/ResizingDragBar.less

raw
1 @import 'mediawiki.skin.variables.less';
2
3 // TODO: Replace static color values as soon as a drag bar and its design tokens
4 // have been defined in Codex.
5
6 // The dimensions of the UI affordance (the little line in the draggable area).
7 @affordance-width: 4px;
8 @affordance-length: 52px;
9 @background-color-wikieditor-resizing-dragbar: @background-color-interactive;
10 @background-color-wikieditor-resizing-dragbar-ew: @background-color-interactive-subtle;
11 @background-color-wikieditor-resizing-dragbar-drag: @background-color-disabled;
12 @background-color-wikieditor-resizing-dragbar-drag--hover: @color-subtle;
13
14 .ext-WikiEditor-ResizingDragBar {
15 background-color: @background-color-wikieditor-resizing-dragbar;
16 display: flex;
17 align-items: center;
18 justify-content: center;
19
20 &-ns {
21 cursor: ns-resize;
22 }
23
24 span {
25 width: @affordance-length;
26 height: @affordance-width;
27 background-color: @background-color-wikieditor-resizing-dragbar-drag;
28 border-radius: @border-radius-base;
29 display: block;
30 margin: 2px;
31 }
32
33 &:hover span {
34 background-color: @background-color-wikieditor-resizing-dragbar-drag--hover;
35 }
36
37 &-ew {
38 cursor: ew-resize;
39 background-color: @background-color-wikieditor-resizing-dragbar-ew;
40
41 span {
42 height: @affordance-length;
43 width: @affordance-width;
44 border-width: 0 @border-width-base;
45 }
46 }
47 }
48
49 // This is needed to make the CodeMirror editor height constrained to .wikiEditor-ui-text
50 // This only is needed when the ResizingDragBar is enabled.
51 .cm-editor {
52 // stylelint-disable-next-line declaration-no-important
53 height: 100% !important;
54 }