@oscarpalmer/oui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/css/a11y.css +13 -0
- package/dist/css/flex.css +150 -0
- package/dist/css/reset.css +282 -0
- package/package.json +39 -0
- package/src/css/a11y.scss +18 -0
- package/src/css/flex.scss +106 -0
- package/src/css/reset.scss +289 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Oscar Palmér
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
:where(.visually-hidden) {
|
|
2
|
+
position: absolute !important;
|
|
3
|
+
}
|
|
4
|
+
:where(.visually-hidden:not(:active):not(:focus):not(:focus-within)) {
|
|
5
|
+
width: 1px !important;
|
|
6
|
+
height: 1px !important;
|
|
7
|
+
padding: 0 !important;
|
|
8
|
+
clip: rect(1px, 1px 1px, 1px) !important;
|
|
9
|
+
clip-path: inset(50%) !important;
|
|
10
|
+
overflow: hidden !important;
|
|
11
|
+
border: 0 !important;
|
|
12
|
+
white-space: nowrap !important;
|
|
13
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
:where(.fill) {
|
|
2
|
+
flex: 1;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:where(.flow, .stack) {
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(.flow) {
|
|
10
|
+
flex-flow: row wrap;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--flow-gap, 1rem);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.flow-large) {
|
|
16
|
+
gap: var(--flow-gap-large, calc(2 * var(--flow-gap, 1rem)));
|
|
17
|
+
}
|
|
18
|
+
:where(.flow-nowrap) {
|
|
19
|
+
flex-wrap: nowrap;
|
|
20
|
+
}
|
|
21
|
+
:where(.flow-small) {
|
|
22
|
+
gap: var(--flow-gap-small, calc(0.5 * var(--flow-gap, 1rem)));
|
|
23
|
+
}
|
|
24
|
+
:where(.flow-text) {
|
|
25
|
+
gap: var(--flow-gap-text, 1em);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.stack) {
|
|
29
|
+
flex-flow: column nowrap;
|
|
30
|
+
gap: var(--stack-gap, 1rem);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.stack-large) {
|
|
34
|
+
gap: var(--stack-gap-large, calc(2 * var(--stack-gap, 1rem)));
|
|
35
|
+
}
|
|
36
|
+
:where(.stack-small) {
|
|
37
|
+
gap: var(--stack-gap-small, calc(0.5 * var(--stack-gap, 1rem)));
|
|
38
|
+
}
|
|
39
|
+
:where(.stack-text) {
|
|
40
|
+
gap: var(--stack-gap-text, 1em);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.flex-reverse[class^=flow i], .flex-reverse[class*=" flow" i]) {
|
|
44
|
+
flex-direction: row-reverse;
|
|
45
|
+
}
|
|
46
|
+
:where(.flex-reverse[class^=stack i], .flex-reverse[class*=" stack" i]) {
|
|
47
|
+
flex-direction: column-reverse;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.flex-ac-c) {
|
|
51
|
+
align-content: center;
|
|
52
|
+
}
|
|
53
|
+
:where(.flex-ac-fe) {
|
|
54
|
+
align-content: flex-end;
|
|
55
|
+
}
|
|
56
|
+
:where(.flex-ac-fs) {
|
|
57
|
+
align-content: flex-start;
|
|
58
|
+
}
|
|
59
|
+
:where(.flex-ac-s) {
|
|
60
|
+
align-content: stretch;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(.flex-ai-c) {
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
:where(.flex-ai-fe) {
|
|
67
|
+
align-items: flex-end;
|
|
68
|
+
}
|
|
69
|
+
:where(.flex-ai-fs) {
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
}
|
|
72
|
+
:where(.flex-ai-s) {
|
|
73
|
+
align-items: stretch;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where(.flex-as-c) {
|
|
77
|
+
align-self: center;
|
|
78
|
+
}
|
|
79
|
+
:where(.flex-as-fe) {
|
|
80
|
+
align-self: flex-end;
|
|
81
|
+
}
|
|
82
|
+
:where(.flex-as-fs) {
|
|
83
|
+
align-self: flex-start;
|
|
84
|
+
}
|
|
85
|
+
:where(.flex-as-s) {
|
|
86
|
+
align-self: stretch;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where(.flex-ac-sa) {
|
|
90
|
+
align-content: space-around;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(.flex-ac-sb) {
|
|
94
|
+
align-content: space-between;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where(.flex-ac-se) {
|
|
98
|
+
align-content: space-evenly;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:where(.flex-jc-c) {
|
|
102
|
+
justify-content: center;
|
|
103
|
+
}
|
|
104
|
+
:where(.flex-jc-fe) {
|
|
105
|
+
justify-content: flex-end;
|
|
106
|
+
}
|
|
107
|
+
:where(.flex-jc-fs) {
|
|
108
|
+
justify-content: flex-start;
|
|
109
|
+
}
|
|
110
|
+
:where(.flex-jc-s) {
|
|
111
|
+
justify-content: stretch;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:where(.flex-ji-c) {
|
|
115
|
+
justify-items: center;
|
|
116
|
+
}
|
|
117
|
+
:where(.flex-ji-fe) {
|
|
118
|
+
justify-items: flex-end;
|
|
119
|
+
}
|
|
120
|
+
:where(.flex-ji-fs) {
|
|
121
|
+
justify-items: flex-start;
|
|
122
|
+
}
|
|
123
|
+
:where(.flex-ji-s) {
|
|
124
|
+
justify-items: stretch;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where(.flex-js-c) {
|
|
128
|
+
justify-self: center;
|
|
129
|
+
}
|
|
130
|
+
:where(.flex-js-fe) {
|
|
131
|
+
justify-self: flex-end;
|
|
132
|
+
}
|
|
133
|
+
:where(.flex-js-fs) {
|
|
134
|
+
justify-self: flex-start;
|
|
135
|
+
}
|
|
136
|
+
:where(.flex-js-s) {
|
|
137
|
+
justify-self: stretch;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:where(.flex-jc-sa) {
|
|
141
|
+
justify-content: space-around;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:where(.flex-jc-sb) {
|
|
145
|
+
justify-content: space-between;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:where(.flex-jc-se) {
|
|
149
|
+
justify-content: space-evenly;
|
|
150
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/*! https://github.com/oscarpalmer/oui */
|
|
3
|
+
/**
|
|
4
|
+
* Reset
|
|
5
|
+
* ========================
|
|
6
|
+
*
|
|
7
|
+
* A reset I use for a lot of personal stuff, and elsewhere, of course.
|
|
8
|
+
* It's a mix of a few different resets mixed together with some of my own ideas.
|
|
9
|
+
*
|
|
10
|
+
* When rules are explained, such comments will be suffixed with one ore more square brackets
|
|
11
|
+
* with a two-letter code, all of which are listed below. My own code is "OP", which are my initials.
|
|
12
|
+
*
|
|
13
|
+
* - Andy Bell's "A (more) Modern CSS Reset" [AB]
|
|
14
|
+
* https://andy-bell.co.uk/a-more-modern-css-reset/
|
|
15
|
+
*
|
|
16
|
+
* - CSS Remedy [CR]
|
|
17
|
+
* https://github.com/jensimmons/cssremedy
|
|
18
|
+
*
|
|
19
|
+
* - RESS [RS]
|
|
20
|
+
* https://github.com/filipelinhares/ress
|
|
21
|
+
*
|
|
22
|
+
* - Sanitize.css [SE]
|
|
23
|
+
* https://github.com/csstools/sanitize.css
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Catch-alls
|
|
27
|
+
*/
|
|
28
|
+
* {
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
*,
|
|
34
|
+
::after,
|
|
35
|
+
::before {
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Document
|
|
41
|
+
*/
|
|
42
|
+
:where(:root) {
|
|
43
|
+
font-family: system-ui, sans-serif;
|
|
44
|
+
font-size: 100%;
|
|
45
|
+
line-height: 1.5;
|
|
46
|
+
-moz-text-size-adjust: none;
|
|
47
|
+
-webkit-text-size-adjust: none;
|
|
48
|
+
text-size-adjust: none;
|
|
49
|
+
-moz-tab-size: 4;
|
|
50
|
+
tab-size: 4;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(body) {
|
|
54
|
+
min-height: 100vh;
|
|
55
|
+
font-size: 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* General
|
|
60
|
+
*/
|
|
61
|
+
:where(a) {
|
|
62
|
+
text-decoration-skip-ink: auto;
|
|
63
|
+
text-underline-offset: 0.125em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(abbr[title]) {
|
|
67
|
+
text-decoration: underline;
|
|
68
|
+
text-decoration: underline dotted;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(b, strong) {
|
|
72
|
+
font-weight: bolder;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(button, h1, h2, h3, h4, h5, h6, input, label, legend) {
|
|
76
|
+
line-height: 1.125;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(button, [type=button i], [type=reset i], [type=submit i]) {
|
|
80
|
+
-webkit-appearance: button;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(code, kbd, pre, samp) {
|
|
85
|
+
font-family: monospace, monospace;
|
|
86
|
+
font-size: 1em;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where(details > summary:first-of-type) {
|
|
90
|
+
display: list-item;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(dl, ol, ul) :where(dl, ol, ul) {
|
|
94
|
+
margin: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
98
|
+
text-wrap: balance;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:where(hr) {
|
|
102
|
+
height: 0;
|
|
103
|
+
overflow: visible;
|
|
104
|
+
border-style: solid;
|
|
105
|
+
border-width: 1px 0 0;
|
|
106
|
+
color: inherit;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where(nav) :where(ol, ul),
|
|
110
|
+
:where(ul[class]) {
|
|
111
|
+
list-style-type: none;
|
|
112
|
+
padding: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(nav li)::before {
|
|
116
|
+
content: "";
|
|
117
|
+
float: left;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:where(pre) {
|
|
121
|
+
overflow: auto;
|
|
122
|
+
white-space: pre-wrap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(small) {
|
|
126
|
+
font-size: 0.875rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where(sub, sup) {
|
|
130
|
+
vertical-align: baseline;
|
|
131
|
+
font-size: 0.75rem;
|
|
132
|
+
line-height: 0;
|
|
133
|
+
position: relative;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where(sub) {
|
|
137
|
+
bottom: -0.25em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:where(sup) {
|
|
141
|
+
top: -0.5em;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:where(table) {
|
|
145
|
+
border-collapse: collapse;
|
|
146
|
+
border-color: currentColor;
|
|
147
|
+
text-indent: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Form-related
|
|
152
|
+
*/
|
|
153
|
+
:where(button, input, optgroup, select, textarea) {
|
|
154
|
+
font: inherit;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:where(button, input, select, textarea) {
|
|
158
|
+
padding: 0.25em 0.5em;
|
|
159
|
+
background-color: transparent;
|
|
160
|
+
border: 1px solid WindowFrame;
|
|
161
|
+
color: inherit;
|
|
162
|
+
letter-spacing: inherit;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where(fieldset) {
|
|
166
|
+
border: 1px solid darkgrey;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:where(optgroup) {
|
|
170
|
+
font-weight: bold;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:where(progress) {
|
|
174
|
+
vertical-align: baseline;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where(select) {
|
|
178
|
+
-moz-appearance: none;
|
|
179
|
+
-webkit-appearance: none;
|
|
180
|
+
appearance: none;
|
|
181
|
+
padding-right: 1em;
|
|
182
|
+
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E") no-repeat right center/1em;
|
|
183
|
+
border-radius: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:where(select[multiple]) {
|
|
187
|
+
background-image: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where(textarea) {
|
|
191
|
+
resize: vertical;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:where([type=color i], [type=range i]) {
|
|
195
|
+
padding: 0;
|
|
196
|
+
border-width: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:where([type=search i]) {
|
|
200
|
+
-webkit-appearance: textfield;
|
|
201
|
+
outline-offset: -2px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
::-webkit-file-upload-button {
|
|
205
|
+
-webkit-appearance: button;
|
|
206
|
+
color: inherit;
|
|
207
|
+
font: inherit;
|
|
208
|
+
line-height: 1.25;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
::-webkit-inner-spin-button,
|
|
212
|
+
::-webkit-outer-spin-button {
|
|
213
|
+
height: auto;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
::-webkit-input-placeholder {
|
|
217
|
+
opacity: 0.54;
|
|
218
|
+
color: inherit;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
::-webkit-search-decoration {
|
|
222
|
+
-webkit-appearance: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Media-related
|
|
227
|
+
*/
|
|
228
|
+
:where(audio, canvas, embed, iframe, img, object, picture, svg, video) {
|
|
229
|
+
max-width: 100%;
|
|
230
|
+
vertical-align: middle;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:where(audio, canvas, embed, iframe, img, object, svg, video) {
|
|
234
|
+
display: block;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:where(audio) {
|
|
238
|
+
width: 100%;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:where(audio:not([controls])) {
|
|
242
|
+
display: none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:where(canvas, img, svg, video) {
|
|
246
|
+
height: auto;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:where(iframe) {
|
|
250
|
+
border-style: none;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:where(picture) {
|
|
254
|
+
display: contents;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:where(source) {
|
|
258
|
+
display: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:where(svg:not([fill])) {
|
|
262
|
+
fill: currentColor;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Attributes
|
|
267
|
+
*/
|
|
268
|
+
:where([disabled], [aria-disabled=true i]) {
|
|
269
|
+
cursor: default;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
[hidden] {
|
|
273
|
+
display: none !important;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:where([aria-busy=true i]) {
|
|
277
|
+
cursor: progress;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
:where([aria-controls]) {
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"name": "Oscar Palmér",
|
|
4
|
+
"url": "https://oscarpalmer.se"
|
|
5
|
+
},
|
|
6
|
+
"description": "Styles, components, and utilities for building websites and applications.",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@biomejs/biome": "^1.9",
|
|
9
|
+
"sass": "^1.80",
|
|
10
|
+
"stylelint": "^16.10"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
"./css/a11y": "./dist/css/a11y.css",
|
|
14
|
+
"./css/flex": "./dist/css/flex.css",
|
|
15
|
+
"./css/reset": "./dist/css/reset.css"
|
|
16
|
+
},
|
|
17
|
+
"files": ["dist", "src"],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"css",
|
|
20
|
+
"scss",
|
|
21
|
+
"design",
|
|
22
|
+
"framework",
|
|
23
|
+
"library",
|
|
24
|
+
"style",
|
|
25
|
+
"stylesheet",
|
|
26
|
+
"utility"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"name": "@oscarpalmer/oui",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/oscarpalmer/oui.git"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "npx sass ./src/css:./dist/css --no-source-map"
|
|
36
|
+
},
|
|
37
|
+
"type": "module",
|
|
38
|
+
"version": "0.1.0"
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! https://github.com/oscarpalmer/oui */
|
|
2
|
+
|
|
3
|
+
.visually-hidden {
|
|
4
|
+
:where(&) {
|
|
5
|
+
position: absolute !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(&:not(:active):not(:focus):not(:focus-within)) {
|
|
9
|
+
width: 1px !important;
|
|
10
|
+
height: 1px !important;
|
|
11
|
+
padding: 0 !important;
|
|
12
|
+
clip: rect(1px, 1px 1px, 1px) !important;
|
|
13
|
+
clip-path: inset(50%) !important;
|
|
14
|
+
overflow: hidden !important;
|
|
15
|
+
border: 0 !important;
|
|
16
|
+
white-space: nowrap !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*! https://github.com/oscarpalmer/oui */
|
|
2
|
+
|
|
3
|
+
:where(.fill) {
|
|
4
|
+
flex: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where(.flow, .stack) {
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where(.flow) {
|
|
12
|
+
flex-flow: row wrap;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--flow-gap, 1rem);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.flow {
|
|
18
|
+
:where(&-large) {
|
|
19
|
+
gap: var(--flow-gap-large, calc(2 * var(--flow-gap, 1rem)));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(&-nowrap) {
|
|
23
|
+
flex-wrap: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(&-small) {
|
|
27
|
+
gap: var(--flow-gap-small, calc(0.5 * var(--flow-gap, 1rem)));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(&-text) {
|
|
31
|
+
gap: var(--flow-gap-text, 1em);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.stack) {
|
|
36
|
+
flex-flow: column nowrap;
|
|
37
|
+
gap: var(--stack-gap, 1rem);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.stack {
|
|
41
|
+
:where(&-large) {
|
|
42
|
+
gap: var(--stack-gap-large, calc(2 * var(--stack-gap, 1rem)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(&-small) {
|
|
46
|
+
gap: var(--stack-gap-small, calc(0.5 * var(--stack-gap, 1rem)));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where(&-text) {
|
|
50
|
+
gap: var(--stack-gap-text, 1em);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.flex {
|
|
55
|
+
&-reverse {
|
|
56
|
+
:where(&[class^='flow' i], &[class*=' flow' i]) {
|
|
57
|
+
flex-direction: row-reverse;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where(&[class^='stack' i], &[class*=' stack' i]) {
|
|
61
|
+
flex-direction: column-reverse;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
$alignmentOrigins: (
|
|
67
|
+
c: 'content',
|
|
68
|
+
i: 'items',
|
|
69
|
+
s: 'self',
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
$alignmentValues: (
|
|
73
|
+
c: 'center',
|
|
74
|
+
fe: 'flex-end',
|
|
75
|
+
fs: 'flex-start',
|
|
76
|
+
s: 'stretch',
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
$justificationValues: (
|
|
80
|
+
sa: 'space-around',
|
|
81
|
+
sb: 'space-between',
|
|
82
|
+
se: 'space-evenly',
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
$types: (
|
|
86
|
+
a: 'align',
|
|
87
|
+
j: 'justify',
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
@each $typeKey, $typeValue in $types {
|
|
91
|
+
@each $alignmentOriginKey, $alignmentOriginValue in $alignmentOrigins {
|
|
92
|
+
.flex-#{$typeKey}#{$alignmentOriginKey} {
|
|
93
|
+
@each $alignmentValueKey, $alignmentValueValue in $alignmentValues {
|
|
94
|
+
:where(&-#{$alignmentValueKey}) {
|
|
95
|
+
#{$typeValue}-#{$alignmentOriginValue}: #{$alignmentValueValue};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@each $justificationKey, $justificationValue in $justificationValues {
|
|
102
|
+
:where(.flex-#{$typeKey}c-#{$justificationKey}) {
|
|
103
|
+
#{$typeValue}-content: #{$justificationValue};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/*! https://github.com/oscarpalmer/oui */
|
|
2
|
+
/**
|
|
3
|
+
* Reset
|
|
4
|
+
* ========================
|
|
5
|
+
*
|
|
6
|
+
* A reset I use for a lot of personal stuff, and elsewhere, of course.
|
|
7
|
+
* It's a mix of a few different resets mixed together with some of my own ideas.
|
|
8
|
+
*
|
|
9
|
+
* When rules are explained, such comments will be suffixed with one ore more square brackets
|
|
10
|
+
* with a two-letter code, all of which are listed below. My own code is "OP", which are my initials.
|
|
11
|
+
*
|
|
12
|
+
* - Andy Bell's "A (more) Modern CSS Reset" [AB]
|
|
13
|
+
* https://andy-bell.co.uk/a-more-modern-css-reset/
|
|
14
|
+
*
|
|
15
|
+
* - CSS Remedy [CR]
|
|
16
|
+
* https://github.com/jensimmons/cssremedy
|
|
17
|
+
*
|
|
18
|
+
* - RESS [RS]
|
|
19
|
+
* https://github.com/filipelinhares/ress
|
|
20
|
+
*
|
|
21
|
+
* - Sanitize.css [SE]
|
|
22
|
+
* https://github.com/csstools/sanitize.css
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Catch-alls
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
* {
|
|
30
|
+
padding: 0;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
*,
|
|
35
|
+
::after,
|
|
36
|
+
::before {
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Document
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
:where(:root) {
|
|
45
|
+
font-family: system-ui, sans-serif;
|
|
46
|
+
font-size: 100%;
|
|
47
|
+
line-height: 1.5;
|
|
48
|
+
-moz-text-size-adjust: none; // Prevent text size inflation (e.g., after orientation change) [AB][RE][SE]
|
|
49
|
+
-webkit-text-size-adjust: none; // ditto
|
|
50
|
+
text-size-adjust: none; // ditto
|
|
51
|
+
-moz-tab-size: 4;
|
|
52
|
+
tab-size: 4;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where(body) {
|
|
56
|
+
min-height: 100vh;
|
|
57
|
+
font-size: 1rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* General
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
:where(a) {
|
|
65
|
+
text-decoration-skip-ink: auto;
|
|
66
|
+
text-underline-offset: 0.125em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(abbr[title]) {
|
|
70
|
+
text-decoration: underline; // Add the correct text decoration in Safari [RS][SE]
|
|
71
|
+
text-decoration: underline dotted; // ditto
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where(b, strong) {
|
|
75
|
+
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari [RS][SE]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(button, h1, h2, h3, h4, h5, h6, input, label, legend) {
|
|
79
|
+
line-height: 1.125; // Set shorter line heights on headings and interactive elements [AB]
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where(button, [type='button' i], [type='reset' i], [type='submit' i]) {
|
|
83
|
+
-webkit-appearance: button; // Correct the inability to style clickable types in iOS [RS][SE]
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where(code, kbd, pre, samp) {
|
|
88
|
+
font-family: monospace, monospace; // Specify the font family of code elements [RS][SE]
|
|
89
|
+
font-size: 1em; // Correct the odd 'em' font sizing in all browsers [RS][SE]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(details > summary:first-of-type) {
|
|
93
|
+
display: list-item; // Add the correct display in Safari [SE]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:where(dl, ol, ul) :where(dl, ol, ul) {
|
|
97
|
+
margin: 0; // Remove the margin on nested lists in Chrome, Edge, and Safari [SE]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
101
|
+
text-wrap: balance;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where(hr) {
|
|
105
|
+
height: 0; // Add the correct box sizing in Firefox [CR][RS][SE]
|
|
106
|
+
overflow: visible; // Show the overflow in Edge and IE [CR][RS]
|
|
107
|
+
border-style: solid;
|
|
108
|
+
border-width: 1px 0 0;
|
|
109
|
+
color: inherit; // Correct the inheritance of border colour in Firefox [CR][RS][SE]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:where(nav) :where(ol, ul),
|
|
113
|
+
:where(ul[class]) {
|
|
114
|
+
list-style-type: none;
|
|
115
|
+
padding: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where(nav li)::before {
|
|
119
|
+
content: '\200B'; // Prevent VoiceOver from ignoring list semantics in Safari [SE]
|
|
120
|
+
float: left;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where(pre) {
|
|
124
|
+
overflow: auto; // Prevent overflow of the container in all browsers [SE]
|
|
125
|
+
white-space: pre-wrap; // Overflow by default is bad… [CR]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:where(small) {
|
|
129
|
+
font-size: 0.875rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:where(sub, sup) {
|
|
133
|
+
vertical-align: baseline;
|
|
134
|
+
font-size: 0.75rem;
|
|
135
|
+
line-height: 0;
|
|
136
|
+
position: relative;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where(sub) {
|
|
140
|
+
bottom: -0.25em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:where(sup) {
|
|
144
|
+
top: -0.5em;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:where(table) {
|
|
148
|
+
border-collapse: collapse;
|
|
149
|
+
border-color: currentColor; // Correct table border colour in Chrome, Edge, and Safari [SE]
|
|
150
|
+
text-indent: 0; // Remove text indentation from table contents in Chrome, Edge, and Safari [RS][SE]
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Form-related
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
:where(button, input, optgroup, select, textarea) {
|
|
158
|
+
font: inherit; // Correct the font inheritance in Firefox, Edge, and Safari [RS][SE]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:where(button, input, select, textarea) {
|
|
162
|
+
padding: 0.25em 0.5em; // Change the inconsistent appearance in all browsers [SE]
|
|
163
|
+
background-color: transparent; // ditto
|
|
164
|
+
border: 1px solid WindowFrame; // ditto
|
|
165
|
+
color: inherit; // ditto
|
|
166
|
+
letter-spacing: inherit; // ditto
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:where(fieldset) {
|
|
170
|
+
border: 1px solid darkgrey; // Change the inconsistent appearance in all browsers [SE]
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:where(optgroup) {
|
|
174
|
+
font-weight: bold; // Restore the font weight unset by previous rules [RS]
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where(progress) {
|
|
178
|
+
vertical-align: baseline; // Add the correct vertical alignment in Chrome, Edge, and Firefox [RS][SE]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where(select) {
|
|
182
|
+
-moz-appearance: none; // Change the inconsistent appearance in all browsers [SE]
|
|
183
|
+
-webkit-appearance: none; // ditto
|
|
184
|
+
appearance: none; // ditto
|
|
185
|
+
padding-right: 1em; // ditto
|
|
186
|
+
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E")
|
|
187
|
+
no-repeat right center / 1em; // ditto
|
|
188
|
+
border-radius: 0; // ditto
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(select[multiple]) {
|
|
192
|
+
background-image: none; // Don't show the arrow for multiple choice selects [SE]
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:where(textarea) {
|
|
196
|
+
resize: vertical; // Change the resize direction in all browsers [RS][SE]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:where([type='color' i], [type='range' i]) {
|
|
200
|
+
padding: 0; // Remove the padding in all browsers [SE]
|
|
201
|
+
border-width: 0; // Remove the border in all browsers [SE]
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:where([type='search' i]) {
|
|
205
|
+
-webkit-appearance: textfield; // Correct the odd appearance in Chrome, Edge, and Safari [RS][SE]
|
|
206
|
+
outline-offset: -2px; // Correct the outline style in Safari [RS][SE]
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
::-webkit-file-upload-button {
|
|
210
|
+
-webkit-appearance: button; // Correct the inability to style upload buttons in iOS and Safari [RS][SE]
|
|
211
|
+
color: inherit;
|
|
212
|
+
font: inherit;
|
|
213
|
+
line-height: 1.25;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
::-webkit-inner-spin-button,
|
|
217
|
+
::-webkit-outer-spin-button {
|
|
218
|
+
height: auto; // Correct the cursor style of increment and decrement buttons in Safari [RS][SE]
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
::-webkit-input-placeholder {
|
|
222
|
+
opacity: 0.54; // Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]
|
|
223
|
+
color: inherit; // Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
::-webkit-search-decoration {
|
|
227
|
+
-webkit-appearance: none; // Remove the inner padding in Chrome, Edge, and Safari on macOS [SE]
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Media-related
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
:where(audio, canvas, embed, iframe, img, object, picture, svg, video) {
|
|
235
|
+
max-width: 100%;
|
|
236
|
+
vertical-align: middle;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:where(audio, canvas, embed, iframe, img, object, svg, video) {
|
|
240
|
+
display: block;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:where(audio) {
|
|
244
|
+
width: 100%; // Better default width [CR]
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:where(audio:not([controls])) {
|
|
248
|
+
display: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:where(canvas, img, svg, video) {
|
|
252
|
+
height: auto; // Maintain aspect ratios [CR]
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:where(iframe) {
|
|
256
|
+
border-style: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:where(picture) {
|
|
260
|
+
display: contents; // Remove the unnecessary wrapping 'picture', while maintaining contents [CR]
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
:where(source) {
|
|
264
|
+
display: none; // Source elements have nothing to display, so we hide them entirely [CR]
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
:where(svg:not([fill])) {
|
|
268
|
+
fill: currentColor;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Attributes
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
:where([disabled], [aria-disabled='true' i]) {
|
|
276
|
+
cursor: default;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[hidden] {
|
|
280
|
+
display: none !important;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
:where([aria-busy='true' i]) {
|
|
284
|
+
cursor: progress;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
:where([aria-controls]) {
|
|
288
|
+
cursor: pointer;
|
|
289
|
+
}
|