File: ve.init.mw.MobileArticleTarget.less

package info (click to toggle)
mediawiki 1%3A1.43.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 417,464 kB
  • sloc: php: 1,062,949; javascript: 664,290; sql: 9,714; python: 5,458; xml: 3,489; sh: 1,131; makefile: 64
file content (109 lines) | stat: -rw-r--r-- 2,595 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*!
 * VisualEditor MediaWiki Initialization MobileArticleTarget styles.
 *
 * @copyright See AUTHORS.txt
 * @license The MIT License (MIT); see LICENSE.txt
 */
@import 'mediawiki.skin.variables.less';

.ve-init-mw-target-surface {
	// margin-left and margin-right defined by the skin
	// (see .content styles in Minerva)
	margin-bottom: 1em;

	> .ve-ce-surface .ve-ce-attachedRootNode,
	> .ve-ui-surface-placeholder {
		padding: 0;

		&::before {
			// This is done in this weird way to allow the margin to collapse with the margin of first
			// element inside the editing surface. See I69d4d4bd9390a1007bc40cda9e78a6b3e7a1bd1d.
			margin-top: 1em;
			content: '';
			display: block;
		}
	}

	> .ve-ce-surface .ve-ce-attachedRootNode {
		// Ensure whole page is focusable (T109508)
		// Subtract toolbar height, margin-bottom and a little more
		// to prevent scrolling.
		min-height: ~'calc( 100vh - 5em )';

		.ve-init-target-ios & {
			// More spacing required on iOS to prevent scrolling.
			min-height: ~'calc( 100vh - 10em )';
		}

		.ve-ui-targetWidget & {
			min-height: 0;
		}
	}
}

.ve-ui-mwTargetWidget {
	/* stylelint-disable-next-line selector-class-pattern */
	.ve-ui-mwSurface.content {
		// When content is applied to surface in a TargetWidget, don't add margins
		margin: 0;
	}
}

/* stylelint-disable-next-line selector-class-pattern */
.ve-init-mw-mobileArticleTarget.overlay {
	// Override MobileFrontend `.overlay` styles.
	// `padding-top` is instead set on a different element in adjustContentPadding().
	padding-top: 0;
}

.ve-init-mw-mobileArticleTarget .ve-ui-overlay-local {
	// Reset line height set by .content
	line-height: 1.4;
}

.oo-ui-windowManager-ios-modal-ready .ve-init-mw-mobileArticleTarget {
	height: 100%;
	overflow: hidden;
}

.ve-init-mw-mobileArticleTarget-toolbar-popups {
	// Avoid jittering while scrolling (T209192)
	position: fixed;
}

@media screen and ( max-width: 767px ) {
	.ve-init-mw-target-surface > .ve-ui-surface-placeholder > * {
		/* Fix margin overlap */
		margin-top: 0;
		/* Placeholder doesn't need a border as well */
		border: 0;
	}
}

.ve-ui-debugBar {
	margin: 0 -16px;
	padding: 0 16px;
	border-top: @border-subtle;
	box-shadow: 0 10px 10px -10px rgba( 0, 0, 0, 0.15 ) inset;

	@media screen and ( min-width: 720px ) {
		margin: 0 -3.35em;
		padding: 0 3.35em;
	}
	padding-top: 0.8em;
}

.ve-ui-targetWidget .ve-ui-debugBar {
	margin: 0;
}

.ve-ui-debugBar-selectionLabel {
	min-width: auto;
	width: 100%;
}

/* Restrict width of context to tablet width */
.ve-ui-mobileContext-menu {
	max-width: 995px;
	margin: 0 auto;
}