Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.less

raw
1 /*!
2 * VisualEditor MediaWiki Initialization MobileArticleTarget styles.
3 *
4 * @copyright See AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7 @import 'mediawiki.skin.variables.less';
8
9 .ve-init-mw-target-surface {
10 // margin-left and margin-right defined by the skin
11 // (see .content styles in Minerva)
12 margin-bottom: 1em;
13
14 > .ve-ce-surface .ve-ce-attachedRootNode,
15 > .ve-ui-surface-placeholder {
16 padding: 0;
17
18 &::before {
19 // This is done in this weird way to allow the margin to collapse with the margin of first
20 // element inside the editing surface. See I69d4d4bd9390a1007bc40cda9e78a6b3e7a1bd1d.
21 margin-top: 1em;
22 content: '';
23 display: block;
24 }
25 }
26
27 > .ve-ce-surface .ve-ce-attachedRootNode {
28 // Ensure whole page is focusable (T109508)
29 // Subtract toolbar height, margin-bottom and a little more
30 // to prevent scrolling.
31 min-height: ~'calc( 100vh - 5em )';
32
33 .ve-init-target-ios & {
34 // More spacing required on iOS to prevent scrolling.
35 min-height: ~'calc( 100vh - 10em )';
36 }
37
38 .ve-ui-targetWidget & {
39 min-height: 0;
40 }
41 }
42 }
43
44 .ve-ui-mwTargetWidget {
45 /* stylelint-disable-next-line selector-class-pattern */
46 .ve-ui-mwSurface.content {
47 // When content is applied to surface in a TargetWidget, don't add margins
48 margin: 0;
49 }
50 }
51
52 /* stylelint-disable-next-line selector-class-pattern */
53 .ve-init-mw-mobileArticleTarget.overlay {
54 // Override MobileFrontend `.overlay` styles.
55 // `padding-top` is instead set on a different element in adjustContentPadding().
56 padding-top: 0;
57 }
58
59 .ve-init-mw-mobileArticleTarget .ve-ui-overlay-local {
60 // Reset line height set by .content
61 line-height: 1.4;
62 }
63
64 .oo-ui-windowManager-ios-modal-ready .ve-init-mw-mobileArticleTarget {
65 height: 100%;
66 overflow: hidden;
67 }
68
69 .ve-init-mw-mobileArticleTarget-toolbar-popups {
70 // Avoid jittering while scrolling (T209192)
71 position: fixed;
72 }
73
74 @media screen and ( max-width: 767px ) {
75 .ve-init-mw-target-surface > .ve-ui-surface-placeholder > * {
76 /* Fix margin overlap */
77 margin-top: 0;
78 /* Placeholder doesn't need a border as well */
79 border: 0;
80 }
81 }
82
83 .ve-ui-debugBar {
84 margin: 0 -16px;
85 padding: 0 16px;
86 border-top: @border-subtle;
87 box-shadow: 0 10px 10px -10px rgba( 0, 0, 0, 0.15 ) inset;
88
89 @media screen and ( min-width: 720px ) {
90 margin: 0 -3.35em;
91 padding: 0 3.35em;
92 }
93 padding-top: 0.8em;
94 }
95
96 .ve-ui-targetWidget .ve-ui-debugBar {
97 margin: 0;
98 }
99
100 .ve-ui-debugBar-selectionLabel {
101 min-width: auto;
102 width: 100%;
103 }
104
105 /* Restrict width of context to tablet width */
106 .ve-ui-mobileContext-menu {
107 max-width: 995px;
108 margin: 0 auto;
109 }