-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
189 lines (165 loc) · 6.02 KB
/
styles.css
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
@import "tailwindcss";
@config "./tailwind.config.js";
@theme {
--spacing: 0.25rem;
/* https://modernfontstacks.com/ */
--font-sans: "Nunito-Medium", "Arial Rounded MT Bold", Calibri, source-sans-pro, sans-serif;
}
@layer base {
/* Base Theme (Light Mode by Default) */
:root {
--color-primary: #609;
--color-secondary: chartreuse;
--color-background: mintcream;
--color-foreground: #001;
--color-thumbnails: rgba(255, 255, 255, .85);
--color-stripes: rgba(127, 255, 0, 0.85);
--color-hiliteb: #a0f;
--color-hilitef: mintcream;
--tw-prose-links: #609;
}
/* Dark Mode */
.dark {
--color-primary: chartreuse;
--color-secondary: #609;
--color-background: #001;
--color-foreground: mintcream;
--color-thumbnails: rgba(102, 0, 153, .85);
--color-stripes: rgba(102, 0, 153, .85);
--color-hiliteb: yellow;
--color-hilitef: #222;
--tw-prose-links: chartreuse;
}
@font-face {
font-family: 'Nunito-Medium';
src: url('/fonts/Nunito-Medium.woff2') format('woff2'), url('/fonts/Nunito-Medium.ttf') format('truetype');
font-display: swap;
}
@font-face {
font-family: 'Nunito-Bold';
src: url('/fonts/Nunito-Bold.woff2') format('woff2'), url('/fonts/Nunito-Bold.ttf') format('truetype');
font-display: swap;
}
@font-face {
font-family: 'Rubik';
src: url('/fonts/Rubik-SemiBold.woff2') format('woff2'),
url('/fonts/Rubik-SemiBold.ttf') format('truetype');
font-display: swap;
}
h1 { font-family: 'Nunito-Bold', sans-serif; font-weight: bold; }
header, h2, h3 {
color: var(--color-primary) !important;
font-family: 'Rubik', sans-serif; font-style: italic;
}
#id-mainContent {
a, h2, h3 {
color: var(--color-primary);
--tw-prose-links: var(--color-primary);
}
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--color-primary); }
::-webkit-scrollbar-thumb:hover { background-color: var(--color-primary); }
* { scrollbar-color: var(--color-primary) transparent; }
/**
* Smooth the transition between pages in browsers that supports it.
* https://developer.mozilla.org/en-US/docs/Web/CSS/@view-transition
*/
@view-transition { navigation: auto; }
}
@layer utilities {
/** Debugging Helpers */
.db-r { box-shadow: inset 0 0 0 4px rgba(255 0 0 / .85); background: repeating-linear-gradient( 0deg, rgba(255 0 0 / .5) 0, rgba(255 0 0 / .5) 1px, transparent 0, transparent 50%) top left / 10px 10px; }
.db-g { box-shadow: inset 0 0 0 4px rgba(0 255 0 / .85); background: repeating-linear-gradient( 45deg, rgba(0 255 0 / .5) 0, rgba(0 255 0 / .5) 1px, transparent 0, transparent 50%) top left / 10px 10px; }
.db-b { box-shadow: inset 0 0 0 4px rgba(0 0 255 / .85); background: repeating-linear-gradient(-45deg, rgba(0 0 255 / .5) 0, rgba(0 0 255 / .5) 1px, transparent 0, transparent 50%) top left / 10px 10px; }
.quick-pulse { animation: pulse .2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
}
/**
* Display Facets Bar or Select for Groups navigation, according to the container width.
* TODO: remove the "@container" warning. It seems to be coming from VSCode's CSS server which TW uses.
*/
@layer components {
/** Use the preact component wrapper to measure container size. */
.cl-facetsMain {
container-type: inline-size;
container-name: facets;
}
@container facets (max-width: 480px) {
.cl-facetsWrapper { @apply flex-col; }
.cl-facetsBar { @apply hidden; }
.cl-facetsSelect { @apply flex; }
}
/** If there's enough width, display the sidebar. */
@container facets (min-width: 480px) {
.cl-facetsWrapper { @apply flex-row; }
.cl-facetsBar { @apply block; }
.cl-facetsSelect { @apply hidden; }
}
}
/**
* Responsive grid layout configuration.
*/
@layer components {
/* 3x3 grid. */
.grid-wrapper {
display: grid;
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(3, 1fr);
overflow: hidden;
}
.grid-facets { grid-area: F; overflow: hidden; overflow-y: auto; }
.grid-main { grid-area: G; overflow: hidden; overflow-y: auto; }
.grid-info { grid-area: I; overflow: hidden; overflow-y: auto; }
/* portrait-narrow */
@media (orientation: portrait) and (max-width: 639px) {
#debug::after { content: 'portrait-narrow'; }
.grid-wrapper {
grid-template-areas: 'F F F'
'G G G'
'I I I';
grid-template-rows: auto 1fr auto;
.grid-facets { max-height: 35dvh; }
.grid-info { max-height: 18dvh; }
}
}
/* portrait-wide */
@media (orientation: portrait) and (min-width: 640px) {
#debug::after { content: 'portrait-wide'; }
.grid-wrapper {
grid-template-areas: 'F F I'
'G G G'
'G G G';
grid-template-rows: auto auto 1fr; /* Grow middle row. */
grid-template-columns: auto auto 1fr; /* Grow middle column. */
.grid-facets { min-width: max(20rem,35dvw); }
.grid-main { min-height: 60dvh; }
}
}
/* landscape-narrow */
@media (orientation: landscape) and (max-width: 1719px) {
#debug::after { content: 'landscape-narrow'; }
.grid-wrapper {
grid-template-areas: 'F G G'
'F G G'
'F I I';
grid-template-columns: auto 1fr auto; /* Grow middle column. */
grid-template-rows: auto 1fr auto; /* Grow middle row. */
.grid-facets { min-width: min(20rem,35dvw); }
.grid-info { max-height: 30dvh; }
}
}
/* landscape-wide */
@media (orientation: landscape) and (min-width: 1720px) {
#debug::after { content: 'landscape-wide'; }
.grid-wrapper {
grid-template-areas: 'F G I'
'F G I'
'F G I';
grid-template-columns: auto 1fr auto; /* Grow middle column. */
grid-template-rows: auto 1fr auto; /* Grow middle row. */
.grid-facets { min-width: 32rem; }
.grid-info { width: 20dvw; }
}
}
}