-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
215 lines (185 loc) · 5.03 KB
/
styles.css
File metadata and controls
215 lines (185 loc) · 5.03 KB
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
/* UCL course format. */
body.format-ucl {
/* Page width. */
#page-header,
.main-inner,
.secondary-navigation .nav-tabs {
max-width: 1140px !important; /* stylelint-disable-line declaration-no-important */
}
#page-navbar {
position: relative !important; /* stylelint-disable-line declaration-no-important */
}
&.path-course-view #page.drawers {
overflow: unset;
}
.single-section ul.course-format-ucl {
padding-left: 0;
}
/* Remove borders. */
.section-item {
border: none;
padding: 0;
}
/* Remove "current" border. */
.course-content .current::before {
border-left: none !important; /* stylelint-disable-line declaration-no-important */
/* This removes the pseudo-element entirely */
content: none !important; /* stylelint-disable-line declaration-no-important */
}
/* Section name - better display when editing. */
.ucl-section-name {
min-width: 95%;
input {
font-size: 2rem;
min-width: 100%;
}
}
/* Toc. */
/* Sticky top gutter when navbar is fixed top - e.g. boost theme. */
&:has(.navbar.fixed-top) {
.sticky-top {
top: 5rem !important; /* stylelint-disable-line declaration-no-important */
}
}
/* Active or coursehome links. */
#toc .active a,
&#page-course-view-ucl .course-home {
color: var(--dark);
}
#toc li {
a {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Section visibility flag and highlight flag logic. */
/* Default state - hide flags. */
.flag-current,
.flag-hidden {
display: none;
}
/* Highlighted section. */
&.current {
.flag-current {
display: inline-block;
}
}
/* Hidden from students. */
&.dimmed {
.flag-hidden {
display: block;
}
.progress-indicator {
display: none;
}
}
}
/* Progress cicle. */
@property --p {
syntax: "<number>";
inherits: true;
initial-value: 0; /* stylelint-disable-line */
}
.pie {
--p: 0;
--b: 3px;
--c: transparent;
--w: 26px;
width: var(--w);
min-width: var(--w);
aspect-ratio: 1;
position: relative;
display: inline-grid;
margin: 5px;
place-content: center;
background-color: #e9ecef;
border-radius: 50%;
}
.pie:before,
.pie:after {
content: "";
position: absolute;
border-radius: 50%;
}
.pie:before {
inset: 0;
background:
radial-gradient(farthest-side, var(--success) 98%, #0000) top/var(--b) var(--b) no-repeat,
conic-gradient(var(--success) calc(var(--p) * 1%), #0000 0);
background-size: 0 0, auto;
-webkit-mask:
radial-gradient(
farthest-side,
#0000 calc(99% - var(--b)),
#000 calc(100% - var(--b))
);
mask:
radial-gradient(
farthest-side,
#0000 calc(99% - var(--b)),
#000 calc(100% - var(--b))
);
}
.pie:after {
inset: calc(50% - var(--b) / 2);
background: var(--success);
transform: rotate(calc(var(--p) * 3.6deg)) translateY(calc(50% - var(--w) / 2));
content: none;
}
.pie.animate {
animation: p 1s 1s both;
.fa-check {
display: none;
}
}
.pie.complete {
transition: all 1s;
background-color: var(--success);
.fa-check {
display: block;
}
}
@keyframes p {
from {
--p: 0;
}
}
#mobile-toc-fab {
bottom: 30px;
left: 0;
z-index: 6666;
a {
font-weight: bold;
box-shadow: 0.3em 0.3em 0 0 var(--dark);
border: 2px solid var(--dark);
}
}
}
/* Mobile toc. */
@media (max-width: 1200px) {
#ucl-course-toc:target {
display: block !important; /* stylelint-disable-line declaration-no-important */
position: fixed !important; /* stylelint-disable-line declaration-no-important */
inset: 0;
z-index: 6666;
background: white;
padding: 2rem;
overflow-y: auto;
}
#ucl-course-toc:target + #ucl-course-content {
display: none;
}
/* TODO - make better. */
/* Can we reverse, so anything not this is display none? */
.format-ucl:has(#ucl-course-toc:target) {
#ucl-footer,
#course-header-bg,
#ucl-navbar,
#ucl-mobile-menu,
#mobile-toc-fab,
.drawer-toggles {
display: none !important; /* stylelint-disable-line declaration-no-important */
}
}
}