Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.less

raw
1 /*!
2 * VisualEditor MediaWiki Initialization DesktopArticleTarget Vector skin styles.
3 *
4 * @copyright See AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7
8 .ve-init-mw-desktopArticleTarget .ve-init-mw-target-surface {
9 /*
10 In order to allow placing the text cursor to the start or end of the text by
11 clicking in the margin area, we expand the outer boundary of the surface
12 outside the parent container using negative margin. Then we shrink the visible
13 rendering by applying inner padding. The end result is that the content is
14 the same width as in read mode, except with the padding around it now being
15 part of it instead of its parent, thus making it treat the area as part
16 of content editable.
17
18 Use `rem` units. This lets us respect custom browser font-size (like `em`),
19 but isn't affected by the parent element font-size, which may be defined in
20 `px` due to `.mw-editfont-monospace` and similar classes. (T222217)
21 */
22
23 margin: 0 -1rem;
24
25 > .ve-ce-surface .ve-ce-attachedRootNode,
26 > .ve-ui-surface-placeholder {
27 padding: 0 1rem;
28 }
29
30 /* Main document debug bar */
31 > .ve-ui-debugBar {
32 padding: 1rem;
33 padding-bottom: 0;
34 margin-top: 1rem;
35 }
36
37 .mw-body & > .ve-ui-surface-placeholder > * {
38 /* Fix margin overlap */
39 margin-top: 0;
40 /* Placeholder doesn't need a border as well */
41 border: 0;
42 }
43
44 .skin-vector-legacy & {
45 /* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */
46 @media screen and ( min-width: 982px ) {
47 margin: 0 -1.5rem;
48
49 > .ve-ce-surface .ve-ce-attachedRootNode,
50 > .ve-ui-surface-placeholder {
51 padding: 0 1.5rem;
52 }
53
54 /* Main document debug bar */
55 > .ve-ui-debugBar {
56 padding: 1.5rem;
57 padding-bottom: 0;
58 margin-top: 1.5rem;
59 }
60 }
61 }
62 }