landsoul 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 YieldRay
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,21 @@
1
+ # landsoul
2
+
3
+ Drop in css library landsoul
4
+ Support dark mode, use `prefers-color-scheme: dark` or `body[data-theme="dark"]`
5
+ IE11 is not supported
6
+ normalize.css is optional
7
+ Preview: <https://yieldray.github.io/landsoul/>
8
+
9
+ ## dev
10
+
11
+ ```bash
12
+ $ npm install
13
+ $ npm run dev
14
+ # xdg-open index.html
15
+ ```
16
+
17
+ ## build
18
+
19
+ ```bash
20
+ $ npm run build
21
+ ```
@@ -0,0 +1,455 @@
1
+ body {
2
+ --landsoul-bg: #fff;
3
+ --landsoul-text: #3d424f;
4
+ --landsoul-shadow: #f4f4f5;
5
+ --landsoul-accent: #2563eb;
6
+ --landsoul-color: #e3e4e8;
7
+ --landsoul-time: 0.3s;
8
+ --landsoul-radius: 0.25em;
9
+ --landsoul-gradient: linear-gradient(#ccfcf7, #c4eae9, #bbd8db, #b3c6cd, #aab4bf);
10
+ }
11
+ body[data-theme="dark"] {
12
+ --landsoul-bg: #202021;
13
+ --landsoul-text: #e7e7e7;
14
+ --landsoul-shadow: #353e5a;
15
+ --landsoul-color: #2b414f;
16
+ }
17
+ @media screen and (color-index: 48) {
18
+ body {
19
+ --landsoul-bg: #202021;
20
+ --landsoul-text: #e7e7e7;
21
+ --landsoul-shadow: #353e5a;
22
+ --landsoul-color: #2b414f;
23
+ }
24
+ }
25
+ @media screen and (color: 48842621) {
26
+ body {
27
+ --landsoul-bg: #202021;
28
+ --landsoul-text: #e7e7e7;
29
+ --landsoul-shadow: #353e5a;
30
+ --landsoul-color: #2b414f;
31
+ }
32
+ }
33
+ @media screen and (prefers-color-scheme: dark) {
34
+ body {
35
+ --landsoul-bg: #202021;
36
+ --landsoul-text: #e7e7e7;
37
+ --landsoul-shadow: #353e5a;
38
+ --landsoul-color: #2b414f;
39
+ }
40
+ }
41
+ body {
42
+ margin: 0;
43
+ }
44
+ a {
45
+ background-color: transparent;
46
+ }
47
+ progress {
48
+ vertical-align: baseline;
49
+ width: 8rem;
50
+ }
51
+ body {
52
+ background-color: var(--landsoul-bg);
53
+ color: var(--landsoul-text);
54
+ font-family: Graphik, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, Helvetica, Arial, sans-serif;
55
+ font-size: 16px;
56
+ -webkit-transition: color var(--landsoul-time), background-color var(--landsoul-time);
57
+ transition: color var(--landsoul-time), background-color var(--landsoul-time);
58
+ }
59
+ a {
60
+ color: var(--landsoul-accent);
61
+ text-decoration: none;
62
+ }
63
+ a:hover {
64
+ text-decoration: underline;
65
+ }
66
+ h1 {
67
+ font-size: 2.5rem;
68
+ }
69
+ h2 {
70
+ font-size: 2.25rem;
71
+ }
72
+ h3 {
73
+ font-size: 2rem;
74
+ }
75
+ h4 {
76
+ font-size: 1.75rem;
77
+ }
78
+ h5 {
79
+ font-size: 1.5rem;
80
+ }
81
+ h6 {
82
+ font-size: 1.25rem;
83
+ }
84
+ a[href^="#"] h1,
85
+ a[href^="#"] h2,
86
+ a[href^="#"] h3,
87
+ a[href^="#"] h4,
88
+ a[href^="#"] h5,
89
+ a[href^="#"] h6 {
90
+ color: var(--landsoul-text);
91
+ }
92
+ a[href^="#"] h1:before,
93
+ a[href^="#"] h2:before,
94
+ a[href^="#"] h3:before,
95
+ a[href^="#"] h4:before,
96
+ a[href^="#"] h5:before,
97
+ a[href^="#"] h6:before {
98
+ color: var(--landsoul-accent);
99
+ content: "#";
100
+ margin-right: 0.3rem;
101
+ }
102
+ h1,
103
+ h2,
104
+ h3,
105
+ h4,
106
+ h5,
107
+ h6 {
108
+ color: inherit;
109
+ margin: 0;
110
+ padding: 0;
111
+ }
112
+ h1 > small,
113
+ h2 > small,
114
+ h3 > small,
115
+ h4 > small,
116
+ h5 > small,
117
+ h6 > small {
118
+ background-color: var(--landsoul-shadow);
119
+ border-radius: var(--landsoul-radius);
120
+ font-weight: lighter;
121
+ margin-left: 0.25rem;
122
+ padding: 0 0.25rem;
123
+ }
124
+ button,
125
+ input,
126
+ select,
127
+ textarea {
128
+ background-color: var(--landsoul-shadow);
129
+ color: var(--landsoul-text);
130
+ }
131
+ button,
132
+ input[type="button"],
133
+ input[type="reset"],
134
+ input[type="submit"],
135
+ select {
136
+ background-color: var(--landsoul-color);
137
+ cursor: pointer;
138
+ -webkit-transition: -webkit-filter var(--landsoul-time);
139
+ transition: -webkit-filter var(--landsoul-time);
140
+ transition: filter var(--landsoul-time);
141
+ transition: filter var(--landsoul-time), -webkit-filter var(--landsoul-time);
142
+ }
143
+ button:hover,
144
+ input[type="button"]:hover,
145
+ input[type="reset"]:hover,
146
+ input[type="submit"]:hover,
147
+ select:hover {
148
+ -webkit-filter: contrast(0.94);
149
+ filter: contrast(0.94);
150
+ }
151
+ button,
152
+ input {
153
+ border: none;
154
+ border-radius: var(--landsoul-radius);
155
+ padding: 0.3em 0.45em;
156
+ }
157
+ input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
158
+ select,
159
+ textarea {
160
+ border: 0.01em solid var(--landsoul-shadow);
161
+ border-radius: var(--landsoul-radius);
162
+ padding: 0.2em 0.3em;
163
+ -webkit-transition: -webkit-filter var(--landsoul-time);
164
+ transition: -webkit-filter var(--landsoul-time);
165
+ transition: filter var(--landsoul-time);
166
+ transition: filter var(--landsoul-time), -webkit-filter var(--landsoul-time);
167
+ }
168
+ input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
169
+ select:hover,
170
+ textarea:hover {
171
+ -webkit-filter: contrast(0.94);
172
+ filter: contrast(0.94);
173
+ }
174
+ input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
175
+ select:focus,
176
+ textarea:focus {
177
+ border: 0.01em solid var(--landsoul-text);
178
+ outline: none;
179
+ }
180
+ textarea {
181
+ min-height: 2rem;
182
+ min-width: 2rem;
183
+ }
184
+ [disabled],
185
+ input[disabled] {
186
+ cursor: not-allowed;
187
+ opacity: 0.5;
188
+ }
189
+ input[type="checkbox"],
190
+ input[type="radio"] {
191
+ --size: 1.25rem;
192
+ all: unset;
193
+ -webkit-appearance: none;
194
+ -moz-appearance: none;
195
+ appearance: none;
196
+ -webkit-box-sizing: border-box;
197
+ box-sizing: border-box;
198
+ cursor: pointer;
199
+ display: inline-block;
200
+ height: var(--size);
201
+ opacity: 0.8;
202
+ position: relative;
203
+ -webkit-transition: all var(--landsoul-time);
204
+ transition: all var(--landsoul-time);
205
+ vertical-align: text-bottom;
206
+ }
207
+ input[type="checkbox"]:hover,
208
+ input[type="radio"]:hover {
209
+ opacity: 1;
210
+ }
211
+ input[type="checkbox"] {
212
+ background: var(--landsoul-shadow);
213
+ border-radius: 1rem;
214
+ width: calc(var(--size) * 1.75);
215
+ }
216
+ input[type="checkbox"]:after {
217
+ background: var(--landsoul-bg);
218
+ border-radius: 50%;
219
+ content: "";
220
+ display: inline-block;
221
+ height: calc(var(--size) * 0.8);
222
+ left: calc(var(--size) * 0.1);
223
+ position: absolute;
224
+ top: calc(var(--size) * 0.1);
225
+ -webkit-transition: all 0.4s;
226
+ transition: all 0.4s;
227
+ width: calc(var(--size) * 0.8);
228
+ }
229
+ input[type="checkbox"]:checked {
230
+ background: var(--landsoul-accent);
231
+ }
232
+ input[type="checkbox"]:checked:after {
233
+ content: "";
234
+ left: 100%;
235
+ position: absolute;
236
+ -webkit-transform: translateX(calc(-100% - var(--size) * 0.1));
237
+ transform: translateX(calc(-100% - var(--size) * 0.1));
238
+ }
239
+ input[type="radio"] {
240
+ border: solid calc(var(--size) * 0.1) var(--landsoul-shadow);
241
+ border-radius: 50%;
242
+ width: var(--size);
243
+ }
244
+ input[type="radio"]:after {
245
+ background: var(--landsoul-accent);
246
+ border-radius: 50%;
247
+ content: "";
248
+ display: inline-block;
249
+ height: calc(var(--size) * 0.6);
250
+ left: 50%;
251
+ opacity: 0;
252
+ position: absolute;
253
+ top: 50%;
254
+ -webkit-transform: translate(-50%, -50%);
255
+ transform: translate(-50%, -50%);
256
+ -webkit-transition: opacity var(--landsoul-time);
257
+ transition: opacity var(--landsoul-time);
258
+ width: calc(var(--size) * 0.6);
259
+ }
260
+ input[type="radio"]:checked:after {
261
+ opacity: 1;
262
+ }
263
+ input[type="range"] {
264
+ -webkit-appearance: none;
265
+ background-color: transparent;
266
+ border-radius: 1rem;
267
+ cursor: pointer;
268
+ height: 0.3rem;
269
+ vertical-align: baseline;
270
+ }
271
+ input[type="range"]::-webkit-slider-runnable-track {
272
+ background-color: var(--landsoul-shadow);
273
+ border-radius: 1rem;
274
+ height: 0.15rem;
275
+ width: 100%;
276
+ }
277
+ input[type="range"]::-webkit-slider-thumb {
278
+ -webkit-appearance: none;
279
+ background-color: var(--landsoul-bg);
280
+ border: 0.2rem solid var(--landsoul-color);
281
+ border-radius: 50%;
282
+ cursor: -webkit-grab;
283
+ cursor: grab;
284
+ height: 1rem;
285
+ -webkit-transform: translateY(-0.4rem) scale(0.8);
286
+ transform: translateY(-0.4rem) scale(0.8);
287
+ -webkit-transition: transform 0.2s;
288
+ -webkit-transition: -webkit-transform 0.2s;
289
+ transition: -webkit-transform 0.2s;
290
+ transition: transform 0.2s;
291
+ transition: transform 0.2s, -webkit-transform 0.2s;
292
+ width: 1rem;
293
+ }
294
+ input[type="range"]::-webkit-slider-thumb:active {
295
+ -webkit-transform: translateY(-0.4rem) scale(1);
296
+ transform: translateY(-0.4rem) scale(1);
297
+ }
298
+ input[type="range"]::-moz-range-progress {
299
+ background-color: var(--landsoul-accent);
300
+ height: 0.1rem;
301
+ }
302
+ input[type="range"]::-moz-range-track {
303
+ background-color: var(--landsoul-shadow);
304
+ height: 0.15rem;
305
+ width: 100%;
306
+ }
307
+ input[type="range"]::-moz-range-thumb {
308
+ -moz-appearance: none;
309
+ background-color: var(--landsoul-bg);
310
+ border: 0.2rem solid var(--landsoul-color);
311
+ border-radius: 50%;
312
+ cursor: grab;
313
+ height: 1rem;
314
+ transform: scale(0.8);
315
+ -moz-transition: transform 0.2s;
316
+ transition: transform 0.2s;
317
+ width: 1rem;
318
+ }
319
+ input[type="range"]::-moz-range-thumb:active {
320
+ transform: scale(1);
321
+ }
322
+ table {
323
+ border-collapse: collapse;
324
+ -webkit-box-shadow: 0.1em 0.1em 0.05em var(--landsoul-shadow), -0.1em -0.1em 0.05em var(--landsoul-shadow);
325
+ box-shadow: 0.1em 0.1em 0.05em var(--landsoul-shadow), -0.1em -0.1em 0.05em var(--landsoul-shadow);
326
+ margin: 0.05em;
327
+ }
328
+ thead {
329
+ background-color: var(--landsoul-shadow);
330
+ color: var(--landsoul-text);
331
+ }
332
+ tbody tr {
333
+ background-color: var(--landsoul-bg);
334
+ }
335
+ tbody tr:nth-child(2n) {
336
+ background-color: var(--landsoul-shadow);
337
+ }
338
+ td,
339
+ th {
340
+ padding: 0.25em 0.5em;
341
+ }
342
+ figure {
343
+ -webkit-box-orient: vertical;
344
+ -webkit-box-direction: normal;
345
+ display: -webkit-box;
346
+ display: -ms-flexbox;
347
+ display: flex;
348
+ -ms-flex-flow: column;
349
+ flex-flow: column;
350
+ margin: auto;
351
+ }
352
+ figure img {
353
+ max-width: 100%;
354
+ }
355
+ figure figcaption {
356
+ font-size: 0.75em;
357
+ margin: 0.5em;
358
+ }
359
+ details {
360
+ padding: 0.5em 0.5em 0;
361
+ }
362
+ summary {
363
+ font-weight: 700;
364
+ margin: -0.5em -0.5em 0;
365
+ }
366
+ details[open],
367
+ summary {
368
+ padding: 0.5em;
369
+ }
370
+ details[open] summary {
371
+ margin-bottom: 0.5em;
372
+ }
373
+ dialog {
374
+ all: unset;
375
+ background-color: var(--landsoul-shadow);
376
+ border-radius: var(--landsoul-radius);
377
+ color: var(--landsoul-text);
378
+ left: 50%;
379
+ max-height: 100%;
380
+ max-width: 100%;
381
+ opacity: 0;
382
+ overflow: auto;
383
+ padding: 0.5rem 1rem;
384
+ position: fixed;
385
+ top: 50%;
386
+ -webkit-transform: translate(-50%, -50%);
387
+ transform: translate(-50%, -50%);
388
+ -webkit-transition: opacity 0.3s;
389
+ transition: opacity 0.3s;
390
+ z-index: 2;
391
+ }
392
+ dialog[open] {
393
+ opacity: 1;
394
+ }
395
+ progress {
396
+ --height: 0.5em;
397
+ background-color: var(--landsoul-shadow);
398
+ border: none;
399
+ border-radius: var(--height);
400
+ color: var(--landsoul-accent);
401
+ height: var(--height);
402
+ line-height: var(--height);
403
+ overflow: hidden;
404
+ }
405
+ progress::-moz-progress-bar {
406
+ background-color: var(--landsoul-accent);
407
+ }
408
+ progress::-webkit-progress-bar {
409
+ background-color: var(--landsoul-shadow);
410
+ }
411
+ progress::-webkit-progress-value {
412
+ background-color: var(--landsoul-accent);
413
+ }
414
+ ::-webkit-meter-bar {
415
+ background-color: var(--landsoul-shadow);
416
+ border: none;
417
+ }
418
+ hr {
419
+ border: none;
420
+ border-top: 0.15em solid var(--landsoul-color);
421
+ }
422
+ blockquote {
423
+ border-left: 0.25rem solid var(--landsoul-shadow);
424
+ font-style: italic;
425
+ margin: 0.5rem 0;
426
+ padding: 0.5rem 1rem;
427
+ }
428
+ code,
429
+ kbd,
430
+ pre {
431
+ background-color: var(--landsoul-shadow);
432
+ border-radius: var(--landsoul-radius);
433
+ }
434
+ code,
435
+ kbd,
436
+ pre,
437
+ samp {
438
+ font-family: Consolas, monospace;
439
+ }
440
+ code,
441
+ kbd {
442
+ padding: 0.05em 0.2em;
443
+ }
444
+ pre {
445
+ padding: 0.5em 0.75em;
446
+ }
447
+ kbd {
448
+ border: solid rgba(0, 0, 0, 0.05);
449
+ border-width: 0.1em 0.1em 0.2em;
450
+ }
451
+ fieldset,
452
+ iframe {
453
+ border: 0.15em solid var(--landsoul-color);
454
+ border-radius: var(--landsoul-radius);
455
+ }
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "landsoul",
3
+ "version": "0.1.0",
4
+ "description": "drop in css library landsoul",
5
+ "main": "./dist/landsoul.css",
6
+ "scripts": {
7
+ "dev": "sass --watch src:dist",
8
+ "build": "rm -rf ./dist && sass src:dist --no-source-map && postcss ./dist/*.css -d ./dist"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/YieldRay/landsoul.git"
13
+ },
14
+ "keywords": [],
15
+ "author": "YieldRay",
16
+ "license": "ISC",
17
+ "bugs": {
18
+ "url": "https://github.com/YieldRay/landsoul/issues"
19
+ },
20
+ "homepage": "https://github.com/YieldRay/landsoul#readme",
21
+ "devDependencies": {
22
+ "autoprefixer": "^10.4.14",
23
+ "cssnano": "^6.0.0",
24
+ "postcss": "^8.4.21",
25
+ "postcss-cli": "^10.1.0",
26
+ "postcss-preset-env": "^7.8.3",
27
+ "sass": "^1.60.0"
28
+ }
29
+ }
@@ -0,0 +1,9 @@
1
+ @mixin theme-color($bg: var(--landsoul-bg)) {
2
+ color: var(--landsoul-text);
3
+ background-color: $bg;
4
+ }
5
+
6
+ @mixin bg-radius($bg: var(--landsoul-shadow), $radius: var(--landsoul-radius)) {
7
+ background-color: $bg;
8
+ border-radius: $radius;
9
+ }
@@ -0,0 +1,32 @@
1
+ @mixin light {
2
+ --landsoul-bg: #fff;
3
+ --landsoul-text: #3d424f;
4
+ --landsoul-shadow: #f4f4f5;
5
+ --landsoul-accent: #2563eb;
6
+ --landsoul-color: #e3e4e8;
7
+ }
8
+
9
+ @mixin dark {
10
+ --landsoul-bg: #202021;
11
+ --landsoul-text: #e7e7e7;
12
+ --landsoul-shadow: #353e5a;
13
+ --landsoul-color: #2b414f;
14
+ }
15
+
16
+ body {
17
+ @include light;
18
+ // other variables
19
+ --landsoul-time: 0.3s;
20
+ --landsoul-radius: 0.25em;
21
+ --landsoul-gradient: linear-gradient(rgb(204, 252, 247), rgb(196, 234, 233), rgb(187, 216, 219), rgb(179, 198, 205), rgb(170, 180, 191));
22
+ }
23
+
24
+ body[data-theme="dark"] {
25
+ @include dark;
26
+ }
27
+
28
+ @media screen and (prefers-color-scheme: dark) {
29
+ body {
30
+ @include dark;
31
+ }
32
+ }
@@ -0,0 +1,16 @@
1
+ details {
2
+ padding: 0.5em 0.5em 0;
3
+ }
4
+
5
+ summary {
6
+ font-weight: bold;
7
+ margin: -0.5em -0.5em 0;
8
+ padding: 0.5em;
9
+ }
10
+
11
+ details[open] {
12
+ padding: 0.5em;
13
+ summary {
14
+ margin-bottom: 0.5em;
15
+ }
16
+ }
@@ -0,0 +1,21 @@
1
+ @import "../mixins";
2
+
3
+ dialog {
4
+ all: unset;
5
+ @include theme-color(var(--landsoul-shadow));
6
+ border-radius: var(--landsoul-radius);
7
+ position: fixed;
8
+ z-index: 2;
9
+ padding: 0.5rem 1rem;
10
+ top: 50%;
11
+ left: 50%;
12
+ transform: translate(-50%, -50%);
13
+ max-height: 100%;
14
+ max-width: 100%;
15
+ overflow: auto;
16
+ opacity: 0;
17
+ transition: opacity 0.3s;
18
+ &[open] {
19
+ opacity: 1;
20
+ }
21
+ }
@@ -0,0 +1,12 @@
1
+ figure {
2
+ display: flex;
3
+ flex-flow: column;
4
+ margin: auto;
5
+ img {
6
+ max-width: 100%;
7
+ }
8
+ figcaption {
9
+ font-size: 0.75em;
10
+ margin: 0.5em;
11
+ }
12
+ }
@@ -0,0 +1,69 @@
1
+ @import "../mixins";
2
+
3
+ body {
4
+ font-family: "Graphik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial,
5
+ sans-serif;
6
+ font-size: 16px;
7
+ transition: color var(--landsoul-time), background-color var(--landsoul-time);
8
+ @include theme-color;
9
+ }
10
+
11
+ a {
12
+ color: var(--landsoul-accent);
13
+ text-decoration: none;
14
+ &:hover {
15
+ text-decoration: underline;
16
+ }
17
+ }
18
+
19
+ h1 {
20
+ font-size: 2.5rem;
21
+ }
22
+ h2 {
23
+ font-size: 2.25rem;
24
+ }
25
+ h3 {
26
+ font-size: 2rem;
27
+ }
28
+ h4 {
29
+ font-size: 1.75rem;
30
+ }
31
+ h5 {
32
+ font-size: 1.5rem;
33
+ }
34
+ h6 {
35
+ font-size: 1.25rem;
36
+ }
37
+
38
+ a[href^="#"] {
39
+ h1,
40
+ h2,
41
+ h3,
42
+ h4,
43
+ h5,
44
+ h6 {
45
+ color: var(--landsoul-text);
46
+ &::before {
47
+ content: "#";
48
+ margin-right: 0.3rem;
49
+ color: var(--landsoul-accent);
50
+ }
51
+ }
52
+ }
53
+
54
+ h1,
55
+ h2,
56
+ h3,
57
+ h4,
58
+ h5,
59
+ h6 {
60
+ color: inherit;
61
+ margin: 0;
62
+ padding: 0;
63
+ > small {
64
+ @include bg-radius;
65
+ margin-left: 0.25rem;
66
+ padding: 0 0.25rem;
67
+ font-weight: lighter;
68
+ }
69
+ }
@@ -0,0 +1,56 @@
1
+ @import "../mixins";
2
+
3
+ button,
4
+ select,
5
+ input,
6
+ textarea {
7
+ @include theme-color(var(--landsoul-shadow));
8
+ }
9
+
10
+ @mixin hover-effect {
11
+ transition: filter var(--landsoul-time);
12
+ &:hover {
13
+ filter: contrast(0.94);
14
+ }
15
+ }
16
+
17
+ select,
18
+ button,
19
+ input[type="button"],
20
+ input[type="submit"],
21
+ input[type="reset"] {
22
+ @include hover-effect;
23
+ cursor: pointer;
24
+ background-color: var(--landsoul-color);
25
+ }
26
+
27
+ button,
28
+ input {
29
+ border: none;
30
+ border-radius: var(--landsoul-radius);
31
+ padding: 0.3em 0.45em;
32
+ }
33
+
34
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
35
+ select,
36
+ textarea {
37
+ @include hover-effect;
38
+ padding: 0.2em 0.3em;
39
+ border-radius: var(--landsoul-radius);
40
+ border: var(--landsoul-shadow) solid 0.01em;
41
+ &:focus {
42
+ outline: none;
43
+ border: var(--landsoul-text) solid 0.01em;
44
+ }
45
+ }
46
+
47
+ textarea {
48
+ min-height: 2rem;
49
+ min-width: 2rem;
50
+ }
51
+
52
+ [disabled],
53
+ input[disabled] {
54
+ opacity: 0.5;
55
+ cursor: not-allowed;
56
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * --size: The size of the switch and radio
3
+ */
4
+ input[type="checkbox"],
5
+ input[type="radio"] {
6
+ --size: 1.25rem;
7
+ all: unset;
8
+ display: inline-block;
9
+ box-sizing: border-box;
10
+ appearance: none;
11
+ transition: all var(--landsoul-time);
12
+ position: relative;
13
+ height: var(--size);
14
+ vertical-align: text-bottom;
15
+ cursor: pointer;
16
+ opacity: 0.8;
17
+ &:hover {
18
+ opacity: 1;
19
+ }
20
+ }
21
+
22
+ input[type="checkbox"] {
23
+ width: calc(var(--size) * 1.75);
24
+ background: var(--landsoul-shadow);
25
+ border-radius: 1rem;
26
+ &::after {
27
+ content: "";
28
+ display: inline-block;
29
+ border-radius: 50%;
30
+ background: var(--landsoul-bg);
31
+ transition: all 0.4s;
32
+ width: calc(var(--size) * 0.8);
33
+ height: calc(var(--size) * 0.8);
34
+ position: absolute;
35
+ left: calc(var(--size) * 0.1);
36
+ top: calc(var(--size) * 0.1);
37
+ }
38
+
39
+ &:checked {
40
+ background: var(--landsoul-accent);
41
+ &::after {
42
+ content: "";
43
+ position: absolute;
44
+ left: 100%;
45
+ transform: translateX(calc(-100% - calc(var(--size) * 0.1)));
46
+ }
47
+ }
48
+ }
49
+
50
+ input[type="radio"] {
51
+ width: var(--size);
52
+ border: solid calc(var(--size) * 0.1) var(--landsoul-shadow);
53
+ border-radius: 50%;
54
+ &::after {
55
+ content: "";
56
+ opacity: 0;
57
+ transition: opacity var(--landsoul-time);
58
+ position: absolute;
59
+ display: inline-block;
60
+ border-radius: 50%;
61
+ background: var(--landsoul-accent);
62
+ width: calc(var(--size) * 0.6);
63
+ height: calc(var(--size) * 0.6);
64
+ top: calc(50%);
65
+ left: calc(50%);
66
+ transform: translate(-50%, -50%);
67
+ }
68
+ &:checked {
69
+ &::after {
70
+ opacity: 1;
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,53 @@
1
+ @mixin thunb-common {
2
+ cursor: grab;
3
+ height: 1rem;
4
+ width: 1rem;
5
+ background-color: var(--landsoul-bg);
6
+ border-radius: 50%;
7
+ border: solid 0.2rem var(--landsoul-color);
8
+ transition: transform 0.2s;
9
+ }
10
+
11
+ @mixin track-common {
12
+ width: 100%;
13
+ height: 0.15rem;
14
+ background-color: var(--landsoul-shadow);
15
+ }
16
+
17
+ input[type="range"] {
18
+ // track
19
+ -webkit-appearance: none; // only for chrome
20
+ background-color: transparent;
21
+ vertical-align: baseline;
22
+ height: 0.3rem;
23
+ cursor: pointer;
24
+ border-radius: 1rem;
25
+
26
+ &::-webkit-slider-runnable-track {
27
+ @include track-common;
28
+ border-radius: 1rem;
29
+ }
30
+ &::-webkit-slider-thumb {
31
+ @include thunb-common;
32
+ -webkit-appearance: none; // only for chrome
33
+ transform: translateY(-0.4rem) scale(0.8, 0.8);
34
+ &:active {
35
+ transform: translateY(-0.4rem) scale(1, 1);
36
+ }
37
+ }
38
+ &::-moz-range-progress {
39
+ height: 0.1rem;
40
+ background-color: var(--landsoul-accent);
41
+ }
42
+ &::-moz-range-track {
43
+ @include track-common;
44
+ }
45
+ &::-moz-range-thumb {
46
+ @include thunb-common;
47
+ -moz-appearance: none; // only for firefox
48
+ transform: scale(0.8, 0.8);
49
+ &:active {
50
+ transform: scale(1, 1);
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,44 @@
1
+ @import "../mixins";
2
+
3
+ hr {
4
+ border: none;
5
+ border-top: solid 0.15em var(--landsoul-color);
6
+ }
7
+
8
+ blockquote {
9
+ border-left: solid 0.25rem var(--landsoul-shadow);
10
+ padding: 0.5rem 1rem;
11
+ margin: 0.5rem 0;
12
+ font-style: italic;
13
+ }
14
+
15
+ code,
16
+ kbd,
17
+ pre {
18
+ @include bg-radius;
19
+ font-family: Consolas, monospace;
20
+ }
21
+
22
+ samp {
23
+ font-family: Consolas, monospace;
24
+ }
25
+
26
+ code,
27
+ kbd {
28
+ padding: 0.05em 0.2em;
29
+ }
30
+
31
+ pre {
32
+ padding: 0.5em 0.75em;
33
+ }
34
+
35
+ kbd {
36
+ border: solid 0.1em rgba(0, 0, 0, 0.05);
37
+ border-bottom: solid 0.2em rgba(0, 0, 0, 0.05);
38
+ }
39
+
40
+ iframe,
41
+ fieldset {
42
+ border: solid 0.15em var(--landsoul-color);
43
+ border-radius: var(--landsoul-radius);
44
+ }
@@ -0,0 +1,24 @@
1
+ progress {
2
+ --height: 0.5em;
3
+ height: var(--height);
4
+ line-height: var(--height);
5
+ background-color: var(--landsoul-shadow); /*IE*/
6
+ color: var(--landsoul-accent); /*IE*/
7
+ overflow: hidden;
8
+ border: none;
9
+ border-radius: var(--height);
10
+ &::-moz-progress-bar {
11
+ background-color: var(--landsoul-accent);
12
+ }
13
+ &::-webkit-progress-bar {
14
+ background-color: var(--landsoul-shadow);
15
+ }
16
+ &::-webkit-progress-value {
17
+ background-color: var(--landsoul-accent);
18
+ }
19
+ }
20
+
21
+ ::-webkit-meter-bar {
22
+ background-color: var(--landsoul-shadow);
23
+ border: none;
24
+ }
@@ -0,0 +1,14 @@
1
+ body {
2
+ margin: 0;
3
+ }
4
+
5
+ a {
6
+ // for IE
7
+ background-color: transparent;
8
+ }
9
+
10
+ progress {
11
+ width: 8rem;
12
+ // for chrome
13
+ vertical-align: baseline;
14
+ }
@@ -0,0 +1,21 @@
1
+ table {
2
+ border-collapse: collapse;
3
+ margin: 0.05em;
4
+ box-shadow: 0.1em 0.1em 0.05em var(--landsoul-shadow), -0.1em -0.1em 0.05em var(--landsoul-shadow);
5
+ }
6
+
7
+ thead {
8
+ color: var(--landsoul-text);
9
+ background-color: var(--landsoul-shadow);
10
+ }
11
+ tbody tr {
12
+ background-color: var(--landsoul-bg);
13
+ &:nth-child(2n) {
14
+ background-color: var(--landsoul-shadow);
15
+ }
16
+ }
17
+
18
+ td,
19
+ th {
20
+ padding: 0.25em 0.5em;
21
+ }
@@ -0,0 +1,12 @@
1
+ @import "theme";
2
+ @import "landsoul/reset";
3
+ @import "landsoul/global";
4
+ @import "landsoul/input";
5
+ @import "landsoul/input_checkbox_radio";
6
+ @import "landsoul/input_range";
7
+ @import "landsoul/table";
8
+ @import "landsoul/figure";
9
+ @import "landsoul/details";
10
+ @import "landsoul/dialog";
11
+ @import "landsoul/progress_meter";
12
+ @import "landsoul/others";