File size: 5,767 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
body {
	-webkit-font-smoothing: antialiased;
}

#title-bar {
	-webkit-app-region: drag;
	display: block;
	background-color: #1e1e1e;
	position: absolute;
	height: 38px;
	top: 0;
	left: 0;
	right: 0;
	user-select: none;
	box-sizing: border-box;
}

#title-bar-buttons {
	-webkit-app-region: no-drag;
	position: fixed;
}

.nav-button {
	display: flex;
	width: 38px;
	height: 38px;
	float: left;
	cursor: pointer;
	background-size: 10px 16px;
	background-repeat: no-repeat;
	background-position: center center;
	background-color: inherit;
	text-align: center;
}

.nav-button:hover {
	background-color: #0c0c0c;
}

.nav-button svg {
	margin: auto;
	fill: #fff;
}

/**
 * CSS specific to the WordPress.com Desktop app

   TODO:
     - We've greatly simplified the app and might not need all of these styles any longer.
     - Review and update/refactor as necessary.
 */

/* Disable text selection where it doesn't make sense. Let's be conservative as it's a usability hit. */
header.masterbar,
.layout__secondary {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* Align everything in the center */
.flex {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	width: 100vw;
}

/**
 * Change scrollbar behavior for desktop app
 */

/*
	Some background for this:
	When you navigate from a page that doesn't need a scrollbar, to a page that does need one, everything that's centered or right-aligned "jumps" a little bit to the left to accomodate the presence of a scrollbar. Permanently enabling it even when not needed is an easy fix for that.
	But in the desktop app, it looks really ugly on screens like the login screen, when there's a vertical scrollbar. And it's also very rare that a vertical scrollbar isn't present after logged in. So therefore, revert to stock browser behavior in the desktop app.
*/

html.is-desktop {
	overflow-y: auto;
}

html.is-desktop.detail-page-open {
	overflow-y: hidden;
}

/**
 * Desktop-only screens (failed-to-start.html etc.)
 */

html.desktop-auth body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	line-height: 1.5;
	font-size: 15px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #222;
	margin: 0;
}

html.desktop-auth .welcome {
	max-width: 360px;
	width: 100%;
	max-height: 100%;
	margin: 0 auto;
	text-align: center;
}

html.desktop-auth p {
	margin-bottom: 20px;
}

html.desktop-auth .welcome h2,
html.desktop-auth .welcome h3 {
	font-size: 28px;
	font-weight: 700;
	/* stylelint-disable-next-line declaration-property-unit-allowed-list */
	line-height: 1.2em;
	margin: 0 0 10px;
}

html.desktop-auth .welcome ol {
	text-align: left;
}

html.desktop-auth .welcome code {
	font-size: 15px;
	color: #646970;
}

html.desktop-auth .large-icon,
html.desktop-auth .large-icon svg {
	width: 80px;
	height: 80px;
	margin: auto;
}

html.desktop-auth .large-icon svg {
	fill: #dcdcde;
}

html.desktop-auth .large-emoji {
	font-size: 56px;
	padding: 4px;
	margin: auto;
}

html.desktop-auth a {
	color: #0675c4;
}

html.desktop-auth a:hover {
	color: #044b7a;
}

html.desktop-auth img {
	max-width: 100%;
	height: auto;
}

html.desktop-auth img.instructions {
	border-radius: 2px;
}

html.desktop-auth #showme {
	width: 640px;
	margin-left: -160px;
}

html.desktop-auth .button-emphasis {
	background: #0675c4;
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
	line-height: 21px;
	border-radius: 4px;
	padding: 7px 14px 9px;
	-webkit-appearance: none;
	appearance: none;
}

html.desktop-auth .button-emphasis:hover {
	color: #fff;
	background: #055d9c;
}

/**
 * Offline warning
 */

html.is-desktop .warning {
	position: fixed;
	z-index: 1000;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px 16px 12px 48px;
	color: #fff;
	background-color: #f0b849; /* $alert-yellow */
	/* stylelint-disable-next-line function-url-quotes */
	background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI0IDI0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZmlsbD0iI2ZmZmZmZiIgZD0iTTEyLDJDNi41LDIsMiw2LjUsMiwxMnM0LjUsMTAsMTAsMTBzMTAtNC41LDEwLTEwUzE3LjUsMiwxMiwyeiBNMTMsMTdoLTJ2LTJoMlYxN3ogTTEzLDEzaC0ybC0wLjUtNmgzTDEzLDEzeiIgLz48L3N2Zz4=");
	background-size: 24px 24px;
	background-position: 12px center;
	background-repeat: no-repeat;
}

html.is-desktop .warning button {
	color: #fff;
	border-bottom: 1px solid #fff;
	cursor: pointer;
}

/**
 * Keep the masterbar sticky even in small sizes
 */

html.is-desktop header#header {
	position: fixed;
}

.form-password-input .form-label {
	text-align: left;
	color: #c8d7e1;
}

/**
 * Disable link dragging when it refers to the localhost
 */

a:not([href*="//"]) {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
}

/**
 * Pin app reminder
 */

.pin-app {
	max-width: 290px;
	color: #fff;
	background: #005083;
	border-radius: 8px; /* stylelint-disable-line scales/radii */
	padding: 10px 15px;
	position: absolute;
	bottom: 20px;
	left: 20px;
}

.pin-app h2 {
	font-weight: bold;
	margin-bottom: 1em;
}

.pin-app img {
	display: block;
	margin: 0 auto;
}

.pin-app .pin-app-close {
	display: block;
	width: 24px;
	height: 24px;
	position: absolute;
	right: 10px;
	top: 10px;
	text-decoration: none;
	fill: #fff;
}