css-zero 0.0.9 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +306 -104
- data/app/assets/stylesheets/_reset.css +1 -1
- data/app/assets/stylesheets/colors.css +0 -25
- data/app/assets/stylesheets/transform.css +32 -40
- data/app/assets/stylesheets/transition.css +2 -7
- data/app/assets/stylesheets/zutilities.css +43 -10
- data/lib/css-zero.rb +3 -6
- data/lib/css_zero/engine.rb +4 -0
- data/lib/css_zero/version.rb +1 -3
- data/lib/generators/css_zero/add/USAGE +8 -0
- data/lib/generators/css_zero/add/add_generator.rb +28 -0
- data/lib/generators/css_zero/add/resources.yml +27 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/chevron-down.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/x.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css +44 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css +18 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/alert_dialog.css +59 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/badge.css +30 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css +77 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css +6 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css +64 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css +51 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css +45 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css +41 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/table.css +27 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_control_controller.js +17 -0
- data/lib/generators/css_zero/install/USAGE +5 -0
- data/lib/generators/css_zero/install/install_generator.rb +9 -0
- data/lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css +46 -0
- metadata +25 -7
- data/app/assets/stylesheets/base.css +0 -4
- data/app/assets/stylesheets/buttons.css +0 -46
- data/app/assets/stylesheets/dialog.css +0 -34
- data/app/assets/stylesheets/inputs.css +0 -43
- data/app/assets/stylesheets/separators.css +0 -4
@@ -23,7 +23,7 @@
|
|
23
23
|
.self-center { align-self: center; }
|
24
24
|
|
25
25
|
.gap { column-gap: var(--column-gap, 1rem); row-gap: var(--row-gap, 1rem); }
|
26
|
-
.gap-
|
26
|
+
.gap-sm { column-gap: 0.5rem; row-gap: 0.5rem; }
|
27
27
|
|
28
28
|
/****************************************************************
|
29
29
|
* Text
|
@@ -51,6 +51,7 @@
|
|
51
51
|
.opacity-75 { opacity: var(--opacity-75); }
|
52
52
|
.opacity-50 { opacity: var(--opacity-50); }
|
53
53
|
|
54
|
+
.leading-none { line-height: var(--leading-none); }
|
54
55
|
.leading-tight { line-height: var(--leading-tight); }
|
55
56
|
.leading-normal { line-height: var(--leading-normal); }
|
56
57
|
|
@@ -84,7 +85,6 @@
|
|
84
85
|
.bg-main { background-color: var(--color-bg); }
|
85
86
|
.bg-black { background-color: var(--color-text); }
|
86
87
|
.bg-white { background-color: var(--color-text-reversed); }
|
87
|
-
.bg-shade { background-color: var(--color-border-light); }
|
88
88
|
.bg-transparent { background-color: transparent; }
|
89
89
|
|
90
90
|
/****************************************************************
|
@@ -92,16 +92,18 @@
|
|
92
92
|
*****************************************************************/
|
93
93
|
.colorize-black { filter: var(--color-filter-text); }
|
94
94
|
.colorize-white { filter: var(--color-filter-text-reversed); }
|
95
|
+
.colorize-negative { filter: var(--color-filter-negative); }
|
96
|
+
.colorize-positive { filter: var(--color-filter-positive); }
|
95
97
|
|
96
98
|
/****************************************************************
|
97
99
|
* Border
|
98
100
|
*****************************************************************/
|
99
|
-
.border-0 { border: 0; }
|
100
|
-
.border { border: var(--border-size, 1px)
|
101
|
-
.border-
|
102
|
-
.border-
|
103
|
-
.border-
|
104
|
-
.border-
|
101
|
+
.border-0 { border-width: 0; }
|
102
|
+
.border { border-width: var(--border-size, 1px); }
|
103
|
+
.border-bs { border-block-start-width: var(--border-size, 1px); }
|
104
|
+
.border-be { border-block-end-width: var(--border-size, 1px); }
|
105
|
+
.border-is { border-inline-start-width: var(--border-size, 1px); }
|
106
|
+
.border-ie { border-inline-end-width: var(--border-size, 1px); }
|
105
107
|
|
106
108
|
.rounded-none { border-radius: none; }
|
107
109
|
.rounded-sm { border-radius: var(--rounded-sm); }
|
@@ -141,8 +143,8 @@
|
|
141
143
|
.h-full { block-size: 100%; }
|
142
144
|
.w-full { inline-size: 100%; }
|
143
145
|
|
144
|
-
.overflow-x-auto { overflow-x: auto; scroll-snap-type: x mandatory;
|
145
|
-
.overflow-y-auto { overflow-y: auto; scroll-snap-type: y mandatory;
|
146
|
+
.overflow-x-auto { overflow-x: auto; scroll-snap-type: x mandatory; }
|
147
|
+
.overflow-y-auto { overflow-y: auto; scroll-snap-type: y mandatory; }
|
146
148
|
.overflow-hidden { overflow: hidden; }
|
147
149
|
|
148
150
|
/****************************************************************
|
@@ -284,6 +286,37 @@
|
|
284
286
|
.pie-8 { padding-inline-end: var(--size-8); }
|
285
287
|
.pie-10 { padding-inline-end: var(--size-10); }
|
286
288
|
|
289
|
+
/****************************************************************
|
290
|
+
* Grid system
|
291
|
+
*****************************************************************/
|
292
|
+
.grid { display: grid; }
|
293
|
+
|
294
|
+
.grid-cols-1 { grid-template-columns: var(--grid-1); }
|
295
|
+
.grid-cols-2 { grid-template-columns: var(--grid-2); }
|
296
|
+
.grid-cols-3 { grid-template-columns: var(--grid-3); }
|
297
|
+
.grid-cols-4 { grid-template-columns: var(--grid-4); }
|
298
|
+
.grid-cols-5 { grid-template-columns: var(--grid-5); }
|
299
|
+
.grid-cols-6 { grid-template-columns: var(--grid-6); }
|
300
|
+
.grid-cols-7 { grid-template-columns: var(--grid-7); }
|
301
|
+
.grid-cols-8 { grid-template-columns: var(--grid-8); }
|
302
|
+
.grid-cols-9 { grid-template-columns: var(--grid-9); }
|
303
|
+
.grid-cols-10 { grid-template-columns: var(--grid-10); }
|
304
|
+
.grid-cols-11 { grid-template-columns: var(--grid-11); }
|
305
|
+
.grid-cols-12 { grid-template-columns: var(--grid-12); }
|
306
|
+
|
307
|
+
.col-span-1 { grid-column: var(--span-1); }
|
308
|
+
.col-span-2 { grid-column: var(--span-2); }
|
309
|
+
.col-span-3 { grid-column: var(--span-3); }
|
310
|
+
.col-span-4 { grid-column: var(--span-4); }
|
311
|
+
.col-span-5 { grid-column: var(--span-5); }
|
312
|
+
.col-span-6 { grid-column: var(--span-6); }
|
313
|
+
.col-span-7 { grid-column: var(--span-7); }
|
314
|
+
.col-span-8 { grid-column: var(--span-8); }
|
315
|
+
.col-span-9 { grid-column: var(--span-9); }
|
316
|
+
.col-span-10 { grid-column: var(--span-10); }
|
317
|
+
.col-span-11 { grid-column: var(--span-11); }
|
318
|
+
.col-span-12 { grid-column: var(--span-12); }
|
319
|
+
|
287
320
|
/****************************************************************
|
288
321
|
* Accessibility
|
289
322
|
*****************************************************************/
|
data/lib/css-zero.rb
CHANGED
data/lib/css_zero/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "rails/generators/named_base"
|
2
|
+
|
3
|
+
class CssZero::AddGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("templates", __dir__)
|
5
|
+
|
6
|
+
argument :components, type: :array, banner: "[components]"
|
7
|
+
|
8
|
+
def add_components
|
9
|
+
components.each { |component| copy_resources_for(component) }
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
def copy_resources_for(component)
|
14
|
+
if resources.has_key?(component)
|
15
|
+
resources[component].each { |resource| copy_file(resource) }
|
16
|
+
else
|
17
|
+
say_status :invalid, component, :red
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def resources
|
22
|
+
@resources ||= YAML.load_file(resources_path)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resources_path
|
26
|
+
File.expand_path "resources.yml", __dir__
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
accordion:
|
2
|
+
- app/assets/stylesheets/accordion.css
|
3
|
+
- app/assets/images/chevron-down.svg
|
4
|
+
alert:
|
5
|
+
- app/assets/stylesheets/alert.css
|
6
|
+
alert_dialog:
|
7
|
+
- app/assets/stylesheets/alert_dialog.css
|
8
|
+
- app/javascript/controllers/dialog_control_controller.js
|
9
|
+
badge:
|
10
|
+
- app/assets/stylesheets/badge.css
|
11
|
+
button:
|
12
|
+
- app/assets/stylesheets/button.css
|
13
|
+
- app/assets/images/loader-circle.svg
|
14
|
+
card:
|
15
|
+
- app/assets/stylesheets/card.css
|
16
|
+
dialog:
|
17
|
+
- app/assets/stylesheets/dialog.css
|
18
|
+
- app/assets/images/x.svg
|
19
|
+
input:
|
20
|
+
- app/assets/stylesheets/input.css
|
21
|
+
- app/assets/images/select-arrow.svg
|
22
|
+
progress:
|
23
|
+
- app/assets/stylesheets/progress.css
|
24
|
+
switch:
|
25
|
+
- app/assets/stylesheets/switch.css
|
26
|
+
table:
|
27
|
+
- app/assets/stylesheets/table.css
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#71717a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
:where(.accordion) {
|
2
|
+
inline-size: var(--size-full);
|
3
|
+
|
4
|
+
details {
|
5
|
+
border-block-end-width: var(--border);
|
6
|
+
transition: padding var(--time-150) var(--ease-in-out);
|
7
|
+
|
8
|
+
&[open] {
|
9
|
+
padding-block-end: var(--size-4);
|
10
|
+
}
|
11
|
+
|
12
|
+
&[open] summary::after {
|
13
|
+
transform: var(--rotate-180);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
summary {
|
18
|
+
align-items: center;
|
19
|
+
cursor: pointer;
|
20
|
+
display: flex;
|
21
|
+
font-weight: var(--font-medium);
|
22
|
+
justify-content: space-between;
|
23
|
+
padding-block: var(--size-4);
|
24
|
+
|
25
|
+
&:focus-visible {
|
26
|
+
outline: var(--border-2) solid var(--color-border-darker);
|
27
|
+
outline-offset: var(--border-2);
|
28
|
+
}
|
29
|
+
|
30
|
+
&::-webkit-details-marker {
|
31
|
+
display: none;
|
32
|
+
}
|
33
|
+
|
34
|
+
&::after {
|
35
|
+
background-image: url("chevron-down.svg");
|
36
|
+
background-size: cover;
|
37
|
+
block-size: var(--size-4);
|
38
|
+
content: "";
|
39
|
+
filter: var(--color-filter-text);
|
40
|
+
inline-size: var(--size-4);
|
41
|
+
transition: transform var(--time-200) var(--ease-in-out);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.alert {
|
2
|
+
border-color: var(--alert-border-color, var(--color-border));
|
3
|
+
border-radius: var(--rounded-lg);
|
4
|
+
border-width: var(--border);
|
5
|
+
color: var(--alert-color, var(--color-text));
|
6
|
+
padding: var(--size-4);
|
7
|
+
inline-size: var(--size-full);
|
8
|
+
|
9
|
+
img:not([class]) {
|
10
|
+
filter: var(--alert-icon-color, var(--color-filter-text-reversed));
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.alert--negative {
|
15
|
+
--alert-border-color: var(--color-negative);
|
16
|
+
--alert-color: var(--color-negative);
|
17
|
+
--alert-icon-color: var(--color-filter-negative);
|
18
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.alert-dialog {
|
2
|
+
background-color: var(--color-bg);
|
3
|
+
border-width: var(--border);
|
4
|
+
border-radius: var(--rounded-lg);
|
5
|
+
box-shadow: var(--shadow-lg);
|
6
|
+
color: var(--color-text);
|
7
|
+
inline-size: var(--size-full);
|
8
|
+
margin: auto;
|
9
|
+
max-inline-size: var(--width-lg);
|
10
|
+
padding: var(--size-6);
|
11
|
+
|
12
|
+
&::backdrop {
|
13
|
+
background-color: rgba(0, 0, 0, .8);
|
14
|
+
}
|
15
|
+
|
16
|
+
/* Setup animation */
|
17
|
+
opacity: 0;
|
18
|
+
transform: var(--scale-95);
|
19
|
+
transition-behavior: allow-discrete;
|
20
|
+
transition-duration: var(--time-150);
|
21
|
+
transition-property: display overlay opacity transform;
|
22
|
+
|
23
|
+
&::backdrop {
|
24
|
+
opacity: 0;
|
25
|
+
transition-behavior: allow-discrete;
|
26
|
+
transition-duration: var(--time-150);
|
27
|
+
transition-property: display overlay opacity;
|
28
|
+
}
|
29
|
+
|
30
|
+
/* In animation */
|
31
|
+
&[open] {
|
32
|
+
opacity: 1; transform: var(--scale-100);
|
33
|
+
}
|
34
|
+
|
35
|
+
&[open]::backdrop {
|
36
|
+
opacity: 1;
|
37
|
+
}
|
38
|
+
|
39
|
+
/* Out animation */
|
40
|
+
@starting-style {
|
41
|
+
&[open] {
|
42
|
+
opacity: 0; transform: var(--scale-95);
|
43
|
+
}
|
44
|
+
|
45
|
+
&[open]::backdrop {
|
46
|
+
opacity: 0;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/* Small screens */
|
51
|
+
@media (width < 40rem) {
|
52
|
+
border-radius: 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
/* Prevent page scroll when alert dialog is open */
|
57
|
+
html:has(.alert-dialog[open]) {
|
58
|
+
overflow: hidden;
|
59
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.badge {
|
2
|
+
background-color: var(--badge-background, var(--color-primary));
|
3
|
+
border-radius: var(--rounded-full);
|
4
|
+
border-width: var(--badge-border-width, 0);
|
5
|
+
color: var(--badge-color, var(--color-text-reversed));
|
6
|
+
font-size: var(--text-xs);
|
7
|
+
font-weight: var(--font-semibold);
|
8
|
+
padding: var(--size-0_5) var(--size-2_5);
|
9
|
+
}
|
10
|
+
|
11
|
+
.badge--secondary {
|
12
|
+
--badge-background: var(--color-secondary);
|
13
|
+
--badge-color: var(--color-text);
|
14
|
+
}
|
15
|
+
|
16
|
+
.badge--outline {
|
17
|
+
--badge-background: transparent;
|
18
|
+
--badge-color: var(--color-text);
|
19
|
+
--btn-border-width: var(--border);
|
20
|
+
}
|
21
|
+
|
22
|
+
.badge--positive {
|
23
|
+
--badge-background: var(--color-positive);
|
24
|
+
--badge-color: white;
|
25
|
+
}
|
26
|
+
|
27
|
+
.badge--negative {
|
28
|
+
--badge-background: var(--color-negative);
|
29
|
+
--badge-color: white;
|
30
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
.btn {
|
2
|
+
align-items: center;
|
3
|
+
background-color: var(--btn-background, var(--color-primary));
|
4
|
+
border-color: var(--color-border);
|
5
|
+
border-radius: var(--rounded-md);
|
6
|
+
border-width: var(--btn-border-width, 0);
|
7
|
+
color: var(--btn-color, var(--color-text-reversed));
|
8
|
+
cursor: pointer;
|
9
|
+
display: inline-flex;
|
10
|
+
font-size: var(--text-sm);
|
11
|
+
font-weight: var(--font-medium);
|
12
|
+
gap: var(--size-2);
|
13
|
+
justify-content: center;
|
14
|
+
padding: var(--size-2) var(--size-4);
|
15
|
+
text-align: center;
|
16
|
+
white-space: nowrap;
|
17
|
+
|
18
|
+
img:not([class]) {
|
19
|
+
filter: var(--btn-icon-color, var(--color-filter-text-reversed));
|
20
|
+
}
|
21
|
+
|
22
|
+
&:focus-visible {
|
23
|
+
outline: var(--border-2) solid var(--color-border-darker);
|
24
|
+
outline-offset: var(--border-2);
|
25
|
+
}
|
26
|
+
|
27
|
+
&:disabled {
|
28
|
+
opacity: var(--opacity-50);
|
29
|
+
pointer-events: none;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.btn--secondary {
|
34
|
+
--btn-background: var(--color-secondary);
|
35
|
+
--btn-color: var(--color-text);
|
36
|
+
--btn-icon-color: var(--color-filter-text);
|
37
|
+
}
|
38
|
+
|
39
|
+
.btn--outline {
|
40
|
+
--btn-background: var(--color-bg);
|
41
|
+
--btn-border-width: var(--border);
|
42
|
+
--btn-color: var(--color-text);
|
43
|
+
--btn-icon-color: var(--color-filter-text);
|
44
|
+
}
|
45
|
+
|
46
|
+
.btn--plain {
|
47
|
+
--btn-background: transparent;
|
48
|
+
--btn-color: var(--color-text);
|
49
|
+
--btn-icon-color: var(--color-filter-text);
|
50
|
+
}
|
51
|
+
|
52
|
+
.btn--negative {
|
53
|
+
--btn-background: var(--color-negative);
|
54
|
+
--btn-color: white;
|
55
|
+
}
|
56
|
+
|
57
|
+
.btn--loading {
|
58
|
+
[aria-busy] &:disabled {
|
59
|
+
position: relative;
|
60
|
+
|
61
|
+
> * {
|
62
|
+
visibility: hidden;
|
63
|
+
}
|
64
|
+
|
65
|
+
&::after {
|
66
|
+
animation: var(--animate-spin);
|
67
|
+
background-image: url("loader-circle.svg");
|
68
|
+
background-size: cover;
|
69
|
+
block-size: var(--size-4);
|
70
|
+
content: "";
|
71
|
+
filter: var(--btn-icon-color, var(--color-filter-text-reversed));
|
72
|
+
inline-size: var(--size-4);
|
73
|
+
margin-inline: auto;
|
74
|
+
position: absolute;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
.dialog {
|
2
|
+
background-color: var(--color-bg);
|
3
|
+
border-width: var(--border);
|
4
|
+
border-radius: var(--rounded-lg);
|
5
|
+
box-shadow: var(--shadow-lg);
|
6
|
+
color: var(--color-text);
|
7
|
+
inline-size: var(--size-full);
|
8
|
+
margin: auto;
|
9
|
+
max-inline-size: var(--width-lg);
|
10
|
+
padding: var(--size-6);
|
11
|
+
|
12
|
+
&::backdrop {
|
13
|
+
background-color: rgba(0, 0, 0, .8);
|
14
|
+
}
|
15
|
+
|
16
|
+
/* Setup animation */
|
17
|
+
opacity: 0;
|
18
|
+
transform: var(--scale-95);
|
19
|
+
transition-behavior: allow-discrete;
|
20
|
+
transition-duration: var(--time-150);
|
21
|
+
transition-property: display overlay opacity transform;
|
22
|
+
|
23
|
+
&::backdrop {
|
24
|
+
opacity: 0;
|
25
|
+
transition-behavior: allow-discrete;
|
26
|
+
transition-duration: var(--time-150);
|
27
|
+
transition-property: display overlay opacity;
|
28
|
+
}
|
29
|
+
|
30
|
+
/* In animation */
|
31
|
+
&:popover-open {
|
32
|
+
opacity: 1; transform: var(--scale-100);
|
33
|
+
}
|
34
|
+
|
35
|
+
&:popover-open::backdrop {
|
36
|
+
opacity: 1;
|
37
|
+
}
|
38
|
+
|
39
|
+
/* Out animation */
|
40
|
+
@starting-style {
|
41
|
+
&:popover-open {
|
42
|
+
opacity: 0; transform: var(--scale-95);
|
43
|
+
}
|
44
|
+
|
45
|
+
&:popover-open::backdrop {
|
46
|
+
opacity: 0;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/* Small screens */
|
51
|
+
@media (width < 40rem) {
|
52
|
+
border-radius: 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
.dialog__close {
|
57
|
+
position: absolute;
|
58
|
+
inset: var(--size-4) var(--size-4) auto auto;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* Prevent page scroll when dialog is open */
|
62
|
+
html:has(.dialog:popover-open) {
|
63
|
+
overflow: hidden;
|
64
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
.input {
|
2
|
+
appearance: none;
|
3
|
+
background-color: var(--color-bg);
|
4
|
+
border-color: var(--color-border);
|
5
|
+
border-radius: var(--rounded-md);
|
6
|
+
border-width: var(--border);
|
7
|
+
box-shadow: var(--shadow-xs);
|
8
|
+
font-size: var(--text-sm);
|
9
|
+
inline-size: var(--size-full);
|
10
|
+
padding: var(--size-2) var(--size-3);
|
11
|
+
|
12
|
+
&:is(select):not([multiple], [size]) {
|
13
|
+
background-image: url("select-arrow.svg");
|
14
|
+
background-position: center right var(--size-2);
|
15
|
+
background-repeat: no-repeat;
|
16
|
+
background-size: var(--size-4) auto;
|
17
|
+
}
|
18
|
+
|
19
|
+
&::file-selector-button {
|
20
|
+
font-weight: var(--font-medium);
|
21
|
+
margin-inline-end: var(--size-2);
|
22
|
+
}
|
23
|
+
|
24
|
+
&::placeholder {
|
25
|
+
color: var(--color-text-subtle);
|
26
|
+
}
|
27
|
+
|
28
|
+
&:user-invalid {
|
29
|
+
border-color: var(--color-negative);
|
30
|
+
}
|
31
|
+
|
32
|
+
&:disabled {
|
33
|
+
cursor: not-allowed;
|
34
|
+
opacity: var(--opacity-50);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.range {
|
39
|
+
accent-color: var(--color-primary);
|
40
|
+
}
|
41
|
+
|
42
|
+
.checkbox, .radio {
|
43
|
+
accent-color: var(--color-primary);
|
44
|
+
transform: scale(1.15);
|
45
|
+
}
|
46
|
+
|
47
|
+
/* Keyboard navigation */
|
48
|
+
:is(.input, .range, .checkbox, .radio):focus-visible {
|
49
|
+
outline: var(--border-2) solid var(--color-border-darker);
|
50
|
+
outline-offset: var(--border-2);
|
51
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.progress {
|
2
|
+
--track: var(--color-secondary);
|
3
|
+
--progress: var(--color-primary);
|
4
|
+
|
5
|
+
background-color: var(--track);
|
6
|
+
border-radius: var(--rounded-full);
|
7
|
+
block-size: var(--size-4);
|
8
|
+
inline-size: var(--size-full);
|
9
|
+
overflow: hidden;
|
10
|
+
|
11
|
+
&:indeterminate {
|
12
|
+
background: linear-gradient(to right, var(--track) 45%, var(--progress) 0%, var(--progress) 55%, var(--track) 0%);
|
13
|
+
background-size: 225% 100%;
|
14
|
+
background-position: right;
|
15
|
+
animation: progress-loading 2s infinite ease;
|
16
|
+
}
|
17
|
+
|
18
|
+
/* Safari/Chromium */
|
19
|
+
&::-webkit-progress-bar {
|
20
|
+
background-color: var(--track);
|
21
|
+
}
|
22
|
+
|
23
|
+
&::-webkit-progress-value {
|
24
|
+
background-color: var(--progress);
|
25
|
+
}
|
26
|
+
|
27
|
+
&:indeterminate::-webkit-progress-bar {
|
28
|
+
background-color: transparent;
|
29
|
+
}
|
30
|
+
|
31
|
+
/* Firefox */
|
32
|
+
&::-moz-progress-bar {
|
33
|
+
background-color: var(--progress);
|
34
|
+
}
|
35
|
+
|
36
|
+
&:indeterminate::-moz-progress-bar {
|
37
|
+
background-color: transparent;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
@keyframes progress-loading {
|
42
|
+
50% {
|
43
|
+
background-position: left;
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
.switch {
|
2
|
+
appearance: none;
|
3
|
+
background-color: var(--color-border);
|
4
|
+
border-color: transparent;
|
5
|
+
border-radius: var(--rounded-full);
|
6
|
+
border-width: var(--border-2);
|
7
|
+
block-size: var(--size-6);
|
8
|
+
cursor: pointer;
|
9
|
+
inline-size: var(--size-11);
|
10
|
+
transition-duration: var(--time-150);
|
11
|
+
transition-property: var(--transition-colors);
|
12
|
+
transition-timing-function: var(--ease-in-out);
|
13
|
+
|
14
|
+
&:checked {
|
15
|
+
background-color: var(--color-primary);
|
16
|
+
}
|
17
|
+
|
18
|
+
&:checked::before {
|
19
|
+
margin-inline-start: var(--size-5);
|
20
|
+
}
|
21
|
+
|
22
|
+
&::before {
|
23
|
+
aspect-ratio: 1;
|
24
|
+
background-color: var(--color-text-reversed);
|
25
|
+
block-size: var(--size-full);
|
26
|
+
border-radius: var(--rounded-full);
|
27
|
+
content: "";
|
28
|
+
display: block;
|
29
|
+
transition: margin var(--time-150) var(--ease-in-out);
|
30
|
+
}
|
31
|
+
|
32
|
+
&:focus-visible {
|
33
|
+
outline: var(--border-2) solid var(--color-border-darker);
|
34
|
+
outline-offset: var(--border-2);
|
35
|
+
}
|
36
|
+
|
37
|
+
&:disabled {
|
38
|
+
cursor: not-allowed;
|
39
|
+
opacity: var(--opacity-50);
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
:where(.table) {
|
2
|
+
font-size: var(--text-sm);
|
3
|
+
inline-size: var(--size-full);
|
4
|
+
|
5
|
+
thead {
|
6
|
+
color: var(--color-text-subtle);
|
7
|
+
}
|
8
|
+
|
9
|
+
tbody tr {
|
10
|
+
border-block-start-width: var(--border);
|
11
|
+
}
|
12
|
+
|
13
|
+
th {
|
14
|
+
font-weight: var(--font-medium);
|
15
|
+
text-align: left;
|
16
|
+
}
|
17
|
+
|
18
|
+
th, td {
|
19
|
+
padding: var(--size-4);
|
20
|
+
}
|
21
|
+
|
22
|
+
tfoot {
|
23
|
+
background-color: var(--color-secondary);
|
24
|
+
border-block-start-width: var(--border);
|
25
|
+
font-weight: var(--font-medium);
|
26
|
+
}
|
27
|
+
}
|