fontcustom_canvas 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/fontcustom_canvas-0.1.0.gem +0 -0
- data/fontcustom_canvas-0.1.1.gem +0 -0
- data/fontcustom_canvas.gemspec +1 -0
- data/lib/fontcustom_canvas.rb +5 -5
- data/lib/fontcustom_canvas/version.rb +1 -1
- data/public/_ic-typography.scss +629 -0
- data/public/_ic_app_header.scss +463 -0
- data/public/_variables.scss +298 -0
- data/public/brandable_css.rb +374 -0
- data/public/brandable_variables.json +233 -0
- data/public/theme_editor/Fonts.js +92 -0
- data/public/theme_editor/PropTypes.js +130 -0
- data/public/theme_editor/ThemeEditorAccordion.js +131 -0
- data/public/theme_editor/ThemeEditorFontFamilyRow.js +147 -0
- data/public/theme_editor/ThemeEditorFontSizeRow.js +152 -0
- data/public/theme_editor/ThemeEditorFontWeightRow.js +176 -0
- metadata +30 -3
@@ -0,0 +1,463 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) 2015 - present Instructure, Inc.
|
3
|
+
*
|
4
|
+
* This file is part of Canvas.
|
5
|
+
*
|
6
|
+
* Canvas is free software: you can redistribute it and/or modify it under
|
7
|
+
* the terms of the GNU Affero General Public License as published by the Free
|
8
|
+
* Software Foundation, version 3 of the License.
|
9
|
+
*
|
10
|
+
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
11
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
12
|
+
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
13
|
+
* details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Affero General Public License along
|
16
|
+
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
*/
|
18
|
+
|
19
|
+
// @mixin primary-nav-badge-border($border-color) { box-shadow: 0 0 0 2px $border-color; }
|
20
|
+
|
21
|
+
/// These are editable variables from the theme editor.
|
22
|
+
/// For more info view stylesheets/brandable_variables.json
|
23
|
+
// ic-brand-global-nav-bgd
|
24
|
+
// ic-brand-global-nav-ic-icon-svg-fill
|
25
|
+
// ic-brand-global-nav-menu-item__text-color
|
26
|
+
// ic-brand-global-nav-avatar-border
|
27
|
+
// ic-brand-global-nav-menu-item__badge-bgd
|
28
|
+
// ic-brand-global-nav-menu-item__badge-text
|
29
|
+
// ic-brand-global-nav-ic-icon-svg-fill--active
|
30
|
+
// ic-brand-global-nav-logo-bgd
|
31
|
+
|
32
|
+
$ic-global-nav-link-hover: rgba(black, 0.2);
|
33
|
+
$ic-global-nav-link-active: rgba(black, 0.4);
|
34
|
+
$ic-masquerade-color: $ic-color-action;
|
35
|
+
$ic-subnav-panel-bgd: $ic-color-light;
|
36
|
+
$ic-subnav-tray-bgd: black;
|
37
|
+
$ic-tooltip-arrow-size: 0.375rem;
|
38
|
+
|
39
|
+
@include desktop-only {
|
40
|
+
.tray-with-space-for-global-nav {
|
41
|
+
margin-#{direction(left)}: $ic-header-primary-width - 10;
|
42
|
+
body.primary-nav-expanded & {
|
43
|
+
margin-#{direction(left)}: $ic-header-primary-width;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
.navigation-tray-container {
|
47
|
+
min-height: 100vh;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
.ic-app-header {
|
52
|
+
box-sizing: border-box;
|
53
|
+
position: fixed;
|
54
|
+
top: 0;
|
55
|
+
#{direction(left)}: 0;
|
56
|
+
height: 100%;
|
57
|
+
display: flex;
|
58
|
+
flex-direction: column;
|
59
|
+
width: $ic-header-primary-width - 15;
|
60
|
+
z-index: 100;
|
61
|
+
background-color: var(--ic-brand-global-nav-bgd);
|
62
|
+
}
|
63
|
+
|
64
|
+
.ic-app-header__main-navigation {
|
65
|
+
box-sizing: border-box;
|
66
|
+
flex: 1 0 auto;
|
67
|
+
}
|
68
|
+
|
69
|
+
.ic-app-header__secondary-navigation {
|
70
|
+
box-sizing: border-box;
|
71
|
+
position: absolute;
|
72
|
+
#{direction(left)}: 0;
|
73
|
+
bottom: 0;
|
74
|
+
z-index: 1;
|
75
|
+
width: 100%;
|
76
|
+
}
|
77
|
+
|
78
|
+
.ic-app-header__menu-list {
|
79
|
+
@include reset-list;
|
80
|
+
}
|
81
|
+
|
82
|
+
.ic-app-header__menu-list-item {
|
83
|
+
box-sizing: border-box;
|
84
|
+
|
85
|
+
font-size: 16px !important;
|
86
|
+
|
87
|
+
&.ic-app-header__menu-list-item--active {
|
88
|
+
.ic-app-header__menu-list-link {
|
89
|
+
background: $ic-color-light;
|
90
|
+
|
91
|
+
body:not(.primary-nav-expanded) & {
|
92
|
+
&:hover,
|
93
|
+
&:focus {
|
94
|
+
.menu-item__text {
|
95
|
+
transition: none;
|
96
|
+
transition-delay: 0;
|
97
|
+
transform: none;
|
98
|
+
opacity: 0;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
&:focus {
|
103
|
+
box-shadow: inset 0 0 0 1px var(--ic-brand-global-nav-bgd),
|
104
|
+
inset 0 0 0 2px var(--ic-brand-global-nav-menu-item__text-color--active);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
.ic-icon-svg {
|
108
|
+
fill: var(--ic-brand-global-nav-ic-icon-svg-fill--active);
|
109
|
+
}
|
110
|
+
.ic-avatar {
|
111
|
+
border-color: $ic-border-light;
|
112
|
+
&.ic-avatar--fake-student {
|
113
|
+
border-color: $ic-masquerade-color;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
.menu-item-icon-container {
|
117
|
+
color: var(--ic-brand-global-nav-ic-icon-svg-fill--active);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
.ic-app-header__menu-list-link {
|
123
|
+
box-sizing: border-box;
|
124
|
+
transition: background-color 0.3s, padding 0.3s;
|
125
|
+
position: relative;
|
126
|
+
text-align: center;
|
127
|
+
display: block;
|
128
|
+
color: var(--ic-brand-global-nav-menu-item__text-color);
|
129
|
+
border-style: none;
|
130
|
+
|
131
|
+
&:not(.ic-app-header__menu-list-link--nav-toggle) {
|
132
|
+
padding: 0.25rem 0;
|
133
|
+
@media only screen and (min-height: 400px) {
|
134
|
+
padding: 0.4375rem 0;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
&.ic-app-header__menu-list-link--nav-toggle {
|
139
|
+
width: 100%;
|
140
|
+
perspective: 600px;
|
141
|
+
|
142
|
+
.ic-icon-svg--navtoggle {
|
143
|
+
transition: all 0.4s;
|
144
|
+
transform: direction-if(rtl, rotate3d(0, 1, 0, -180deg));
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
&:hover,
|
149
|
+
&:focus {
|
150
|
+
background-color: $ic-global-nav-link-hover;
|
151
|
+
@if $use_high_contrast == false {
|
152
|
+
text-decoration: none;
|
153
|
+
outline: none;
|
154
|
+
}
|
155
|
+
.ic-avatar {
|
156
|
+
border-color: var(--ic-brand-global-nav-avatar-border);
|
157
|
+
&.ic-avatar--fake-student {
|
158
|
+
border-color: $ic-masquerade-color;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
.menu-item__text {
|
162
|
+
transform: translate3d($ic-tooltip-arrow-size, 0, 0);
|
163
|
+
opacity: 1;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
&:focus {
|
168
|
+
box-shadow: inset 0 0 0 1px var(--ic-brand-global-nav-bgd),
|
169
|
+
inset 0 0 0 2px var(--ic-brand-global-nav-menu-item__text-color);
|
170
|
+
}
|
171
|
+
|
172
|
+
&:active {
|
173
|
+
background-color: $ic-global-nav-link-active;
|
174
|
+
box-shadow: inset 0 1px 1px rgba(black, 0.3);
|
175
|
+
}
|
176
|
+
|
177
|
+
.ic-icon-svg {
|
178
|
+
width: 26px;
|
179
|
+
display: inline-block;
|
180
|
+
vertical-align: middle;
|
181
|
+
fill: var(--ic-brand-global-nav-ic-icon-svg-fill);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
button.ic-app-header__menu-list-link {
|
186
|
+
background: transparent;
|
187
|
+
outline: none;
|
188
|
+
width: 100%;
|
189
|
+
}
|
190
|
+
|
191
|
+
.ic-avatar {
|
192
|
+
overflow: hidden;
|
193
|
+
border-radius: 100%;
|
194
|
+
border: 2px solid var(--ic-brand-global-nav-avatar-border);
|
195
|
+
width: 50px;
|
196
|
+
height: 50px;
|
197
|
+
box-sizing: border-box;
|
198
|
+
display: inline-block;
|
199
|
+
vertical-align: middle;
|
200
|
+
&.ic-avatar--fake-student {
|
201
|
+
border-color: $ic-masquerade-color;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
.menu-item-icon-container {
|
206
|
+
transform: translate3d(0, 0, 0);
|
207
|
+
position: relative;
|
208
|
+
z-index: 1;
|
209
|
+
width: $ic-sp * 4;
|
210
|
+
margin: 0 auto;
|
211
|
+
color: var(--ic-brand-global-nav-ic-icon-svg-fill);
|
212
|
+
|
213
|
+
.ic-avatar {
|
214
|
+
transform: translate3d(0, 0, 0);
|
215
|
+
width: $ic-sp * 2.5;
|
216
|
+
height: $ic-sp * 2.5;
|
217
|
+
|
218
|
+
body.primary-nav-expanded & {
|
219
|
+
width: $ic-sp * 3;
|
220
|
+
height: $ic-sp * 3;
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
.menu-item__text {
|
226
|
+
// set up properties to transition on hover/focus
|
227
|
+
transform: translate3d(-100%, 0, 0);
|
228
|
+
opacity: 0;
|
229
|
+
|
230
|
+
pointer-events: none;
|
231
|
+
box-sizing: border-box;
|
232
|
+
background-color: var(--ic-brand-global-nav-ic-icon-svg-fill--active);
|
233
|
+
position: absolute;
|
234
|
+
#{direction(left)}: 100%;
|
235
|
+
top: 50%;
|
236
|
+
padding: 0 $ic-sp;
|
237
|
+
line-height: 1.8rem;
|
238
|
+
margin-top: -0.9rem;
|
239
|
+
@include fontSize($ic-font-size--xsmall);
|
240
|
+
font-size: 16px !important;
|
241
|
+
border-radius: $ic-border-radius / 2;
|
242
|
+
color: $ic-color-light;
|
243
|
+
white-space: nowrap;
|
244
|
+
|
245
|
+
// this class is added after a 1s delay because the
|
246
|
+
// transitions look weird when the nav is being closed
|
247
|
+
body.primary-nav-transitions & {
|
248
|
+
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
|
249
|
+
transition-delay: 0.3s;
|
250
|
+
}
|
251
|
+
|
252
|
+
&::after {
|
253
|
+
#{direction(right)}: 100%;
|
254
|
+
top: 50%;
|
255
|
+
border: solid transparent;
|
256
|
+
content: '';
|
257
|
+
height: 0;
|
258
|
+
width: 0;
|
259
|
+
position: absolute;
|
260
|
+
pointer-events: none;
|
261
|
+
border-color: transparent;
|
262
|
+
border-#{direction(right)}-color: var(--ic-brand-global-nav-ic-icon-svg-fill--active);
|
263
|
+
border-width: $ic-tooltip-arrow-size;
|
264
|
+
margin-top: -($ic-tooltip-arrow-size);
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
268
|
+
.menu-item__badge {
|
269
|
+
@include ic-badge-maker;
|
270
|
+
transition: all 0.3s ease-out;
|
271
|
+
position: absolute;
|
272
|
+
top: -0.5em;
|
273
|
+
#{direction(right)}: 0;
|
274
|
+
background: var(--ic-brand-global-nav-menu-item__badge-bgd);
|
275
|
+
color: var(--ic-brand-global-nav-menu-item__badge-text);
|
276
|
+
}
|
277
|
+
|
278
|
+
.ic-app-header__logomark-container {
|
279
|
+
width: 100%;
|
280
|
+
background-color: var(--ic-brand-global-nav-logo-bgd);
|
281
|
+
box-sizing: border-box;
|
282
|
+
}
|
283
|
+
|
284
|
+
.ic-app-header__logomark {
|
285
|
+
display: block;
|
286
|
+
overflow: hidden;
|
287
|
+
background-image: var(--ic-brand-header-image);
|
288
|
+
background-position: 50%;
|
289
|
+
background-repeat: no-repeat;
|
290
|
+
background-size: contain;
|
291
|
+
transition: transform 0.3s;
|
292
|
+
height: 75px;
|
293
|
+
|
294
|
+
body.primary-nav-expanded & {
|
295
|
+
height: 85px;
|
296
|
+
}
|
297
|
+
&:focus {
|
298
|
+
outline-style: none;
|
299
|
+
box-shadow: inset 0 0 0 1px var(--ic-brand-global-nav-bgd),
|
300
|
+
inset 0 0 0 2px var(--ic-brand-global-nav-menu-item__text-color);
|
301
|
+
}
|
302
|
+
}
|
303
|
+
// set to block to avoid any exta inline spacing at bottom
|
304
|
+
.ic-app-header__uploaded-logo {
|
305
|
+
display: block;
|
306
|
+
}
|
307
|
+
|
308
|
+
.ic-app-header__menu-list-link {
|
309
|
+
padding: 0.5625rem 0;
|
310
|
+
}
|
311
|
+
|
312
|
+
// stuff that changes when the nav is expanded
|
313
|
+
body.primary-nav-expanded {
|
314
|
+
.ic-app-header {
|
315
|
+
width: $ic-header-primary-width;
|
316
|
+
overflow-y: auto;
|
317
|
+
-ms-overflow-style: none; // IE11 and below was throwing on scrollbars no matter if needed or not
|
318
|
+
}
|
319
|
+
|
320
|
+
.ic-app-header__secondary-navigation {
|
321
|
+
position: static;
|
322
|
+
#{direction(left)}: auto;
|
323
|
+
bottom: auto;
|
324
|
+
z-index: auto;
|
325
|
+
width: auto;
|
326
|
+
}
|
327
|
+
|
328
|
+
.ic-app-header__menu-list-item.ic-app-header__menu-list-item--active {
|
329
|
+
.menu-item__text {
|
330
|
+
@if $use_high_contrast {
|
331
|
+
color: var(--ic-link-color);
|
332
|
+
} @else {
|
333
|
+
color: var(--ic-brand-global-nav-menu-item__text-color--active);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
.ic-app-header__menu-list-link {
|
339
|
+
&.ic-app-header__menu-list-link--nav-toggle {
|
340
|
+
.ic-icon-svg--navtoggle {
|
341
|
+
transform: direction-if(rtl, none, rotate3d(0, 1, 0, -180deg));
|
342
|
+
}
|
343
|
+
}
|
344
|
+
|
345
|
+
&:hover,
|
346
|
+
&:focus {
|
347
|
+
.menu-item__text {
|
348
|
+
transform: none;
|
349
|
+
}
|
350
|
+
}
|
351
|
+
}
|
352
|
+
|
353
|
+
.menu-item__text {
|
354
|
+
transition: none;
|
355
|
+
position: static;
|
356
|
+
#{direction(left)}: auto;
|
357
|
+
top: auto;
|
358
|
+
transform: none;
|
359
|
+
opacity: 1;
|
360
|
+
text-align: center;
|
361
|
+
display: block;
|
362
|
+
line-height: 1.4;
|
363
|
+
border-radius: 0;
|
364
|
+
margin: $ic-sp/4 0 0;
|
365
|
+
padding: 0;
|
366
|
+
background: transparent;
|
367
|
+
color: var(--ic-brand-global-nav-menu-item__text-color);
|
368
|
+
white-space: normal;
|
369
|
+
word-wrap: break-word;
|
370
|
+
padding-#{direction(left)}: 0.25rem;
|
371
|
+
padding-#{direction(right)}: 0.25rem;
|
372
|
+
|
373
|
+
&::after {
|
374
|
+
display: none;
|
375
|
+
}
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
// help dialog/tray styles
|
380
|
+
.ic-HelpDialog__form-legend {
|
381
|
+
display: table;
|
382
|
+
font-size: 1em;
|
383
|
+
line-height: inherit;
|
384
|
+
font-weight: bold;
|
385
|
+
margin: 0;
|
386
|
+
padding: 0;
|
387
|
+
border: 0;
|
388
|
+
min-width: 0;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ic-HelpDialog__form-fieldset {
|
392
|
+
border: 0;
|
393
|
+
padding: 0.01em 0 0;
|
394
|
+
min-width: 0;
|
395
|
+
margin: direction-sides(0 0 $spacing-width/2 0);
|
396
|
+
}
|
397
|
+
|
398
|
+
.ic-HelpDialog__form-actions {
|
399
|
+
display: flex;
|
400
|
+
justify-content: flex-end;
|
401
|
+
}
|
402
|
+
|
403
|
+
#mobile-header {
|
404
|
+
z-index: 100;
|
405
|
+
background-color: var(--ic-brand-global-nav-bgd);
|
406
|
+
* {
|
407
|
+
color: var(--ic-brand-global-nav-menu-item__text-color);
|
408
|
+
}
|
409
|
+
}
|
410
|
+
#mobileContextNavContainer {
|
411
|
+
overflow: hidden;
|
412
|
+
// we transition max-height instead of height because otherwise we'd have to give it an explicit height and not "auto"
|
413
|
+
transition: max-height 1.5s ease-out;
|
414
|
+
max-height: 0px;
|
415
|
+
&[aria-expanded='true'] {
|
416
|
+
max-height: 3000px;
|
417
|
+
margin-bottom: 50px;
|
418
|
+
box-shadow: 0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25);
|
419
|
+
}
|
420
|
+
}
|
421
|
+
|
422
|
+
@include desktop-only {
|
423
|
+
#mobile-header,
|
424
|
+
#mobileContextNavContainer {
|
425
|
+
display: none;
|
426
|
+
}
|
427
|
+
}
|
428
|
+
.mobile-header-hamburger {
|
429
|
+
float: direction(left);
|
430
|
+
}
|
431
|
+
.mobile-header-title {
|
432
|
+
text-align: center;
|
433
|
+
display: block;
|
434
|
+
}
|
435
|
+
.mobile-header-hamburger,
|
436
|
+
.mobile-header-title {
|
437
|
+
padding: $ic-sp * 1.3;
|
438
|
+
}
|
439
|
+
.ic-brand-mobile-global-nav-logo {
|
440
|
+
height: 48px;
|
441
|
+
display: block;
|
442
|
+
background-image: var(--ic-brand-mobile-global-nav-logo);
|
443
|
+
background-position: top left;
|
444
|
+
background-repeat: no-repeat;
|
445
|
+
background-size: contain;
|
446
|
+
}
|
447
|
+
|
448
|
+
// Tourpoints Styles
|
449
|
+
#___reactour {
|
450
|
+
.reactour__helper {
|
451
|
+
background-color: white;
|
452
|
+
color: unset;
|
453
|
+
max-width: 515px;
|
454
|
+
width: calc(100vw - 20px);
|
455
|
+
}
|
456
|
+
.tour-star-image {
|
457
|
+
max-width: 120px;
|
458
|
+
padding: 1rem 0;
|
459
|
+
margin: 0 auto;
|
460
|
+
text-align: center;
|
461
|
+
}
|
462
|
+
}
|
463
|
+
|