css-zero 0.0.17 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -393
- data/app/assets/stylesheets/_reset.css +10 -21
- data/app/assets/stylesheets/animations.css +144 -16
- data/app/assets/stylesheets/effects.css +0 -1
- data/app/assets/stylesheets/typography.css +16 -4
- data/app/assets/stylesheets/zutilities.css +7 -15
- data/app/helpers/dialog_helper.rb +5 -0
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/USAGE +1 -1
- data/lib/generators/css_zero/add/resources.yml +7 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/chevron-left.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/ellipsis.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/avatar.css +7 -9
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/badge.css +3 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css +10 -2
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css +22 -5
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/pagination.css +33 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/prose.css +135 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/table.css +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js +10 -2
- data/lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css +4 -2
- metadata +7 -2
@@ -54,13 +54,25 @@
|
|
54
54
|
--leading-10: 2.5rem; /* 40px */
|
55
55
|
|
56
56
|
/****************************************************************
|
57
|
-
* Font Family
|
57
|
+
* Font Family (https://modernfontstacks.com)
|
58
58
|
* Variables for controlling the font family of an element.
|
59
59
|
* font-family: var(--font-sans);
|
60
60
|
*****************************************************************/
|
61
|
-
--font-
|
62
|
-
--font-
|
63
|
-
--font-
|
61
|
+
--font-system-ui: system-ui, sans-serif;
|
62
|
+
--font-transitional: Charter, Bitstream Charter, Sitka Text, Cambria, serif;
|
63
|
+
--font-old-style: Iowan Old Style, Palatino Linotype, URW Palladio L, P052, serif;
|
64
|
+
--font-humanist: Seravek, Gill Sans Nova, Ubuntu, Calibri, DejaVu Sans, source-sans-pro, sans-serif;
|
65
|
+
--font-geometric-humanist: Avenir, Montserrat, Corbel, URW Gothic, source-sans-pro, sans-serif;
|
66
|
+
--font-classical-humanist: Optima, Candara, Noto Sans, source-sans-pro, sans-serif;
|
67
|
+
--font-neo-grotesque: Inter, Roboto, Helvetica Neue, Arial Nova, Nimbus Sans, Arial, sans-serif;
|
68
|
+
--font-monospace-slab-serif: Nimbus Mono PS, Courier New, monospace;
|
69
|
+
--font-monospace-code: Dank Mono, Operator Mono, Inconsolata, Fira Mono, ui-monospace, SF Mono, Monaco, Droid Sans Mono, Source Code Pro, Cascadia Code, Menlo, Consolas, DejaVu Sans Mono, monospace;
|
70
|
+
--font-industrial: Bahnschrift, DIN Alternate, Franklin Gothic Medium, Nimbus Sans Narrow, sans-serif-condensed, sans-serif;
|
71
|
+
--font-rounded-sans: ui-rounded, Hiragino Maru Gothic ProN, Quicksand, Comfortaa, Manjari, Arial Rounded MT, Arial Rounded MT Bold, Calibri, source-sans-pro, sans-serif;
|
72
|
+
--font-slab-serif: Rockwell, Rockwell Nova, Roboto Slab, DejaVu Serif, Sitka Small, serif;
|
73
|
+
--font-antique: Superclarendon, Bookman Old Style, URW Bookman, URW Bookman L, Georgia Pro, Georgia, serif;
|
74
|
+
--font-didone: Didot, Bodoni MT, Noto Serif Display, URW Palladio L, P052, Sylfaen, serif;
|
75
|
+
--font-handwritten: Segoe Print, Bradley Hand, Chilanka, TSCu_Comic, casual, cursive;
|
64
76
|
|
65
77
|
/****************************************************************
|
66
78
|
* Letter Spacing
|
@@ -88,7 +88,7 @@
|
|
88
88
|
.bg-main { background-color: var(--color-bg); }
|
89
89
|
.bg-black { background-color: var(--color-text); }
|
90
90
|
.bg-white { background-color: var(--color-text-reversed); }
|
91
|
-
.bg-shade { background-color: var(--color-
|
91
|
+
.bg-shade { background-color: var(--color-border-light); }
|
92
92
|
.bg-transparent { background-color: transparent; }
|
93
93
|
|
94
94
|
/****************************************************************
|
@@ -110,6 +110,12 @@
|
|
110
110
|
.border-is { border-inline-start-width: var(--border-size, 1px); }
|
111
111
|
.border-ie { border-inline-end-width: var(--border-size, 1px); }
|
112
112
|
|
113
|
+
.border-main { border-color: var(--color-border); }
|
114
|
+
.border-dark { border-color: var(--color-border-dark); }
|
115
|
+
|
116
|
+
.border-solid { border-style: solid; }
|
117
|
+
.border-dashed { border-style: dashed; }
|
118
|
+
|
113
119
|
.rounded-none { border-radius: none; }
|
114
120
|
.rounded-sm { border-radius: var(--rounded-sm); }
|
115
121
|
.rounded { border-radius: var(--rounded); }
|
@@ -159,7 +165,6 @@
|
|
159
165
|
.m-0\.5 { margin: var(--size-0_5); }
|
160
166
|
.m-1 { margin: var(--size-1); }
|
161
167
|
.m-2 { margin: var(--size-2); }
|
162
|
-
.m-3 { margin: var(--size-3); }
|
163
168
|
.m-4 { margin: var(--size-4); }
|
164
169
|
.m-6 { margin: var(--size-6); }
|
165
170
|
.m-8 { margin: var(--size-8); }
|
@@ -170,7 +175,6 @@
|
|
170
175
|
.mb-0\.5 { margin-block: var(--size-0_5); }
|
171
176
|
.mb-1 { margin-block: var(--size-1); }
|
172
177
|
.mb-2 { margin-block: var(--size-2); }
|
173
|
-
.mb-3 { margin-block: var(--size-3); }
|
174
178
|
.mb-4 { margin-block: var(--size-4); }
|
175
179
|
.mb-6 { margin-block: var(--size-6); }
|
176
180
|
.mb-8 { margin-block: var(--size-8); }
|
@@ -181,7 +185,6 @@
|
|
181
185
|
.mbs-0\.5 { margin-block-start: var(--size-0_5); }
|
182
186
|
.mbs-1 { margin-block-start: var(--size-1); }
|
183
187
|
.mbs-2 { margin-block-start: var(--size-2); }
|
184
|
-
.mbs-3 { margin-block-start: var(--size-3); }
|
185
188
|
.mbs-4 { margin-block-start: var(--size-4); }
|
186
189
|
.mbs-6 { margin-block-start: var(--size-6); }
|
187
190
|
.mbs-8 { margin-block-start: var(--size-8); }
|
@@ -192,7 +195,6 @@
|
|
192
195
|
.mbe-0\.5 { margin-block-end: var(--size-0_5); }
|
193
196
|
.mbe-1 { margin-block-end: var(--size-1); }
|
194
197
|
.mbe-2 { margin-block-end: var(--size-2); }
|
195
|
-
.mbe-3 { margin-block-end: var(--size-3); }
|
196
198
|
.mbe-4 { margin-block-end: var(--size-4); }
|
197
199
|
.mbe-6 { margin-block-end: var(--size-6); }
|
198
200
|
.mbe-8 { margin-block-end: var(--size-8); }
|
@@ -203,7 +205,6 @@
|
|
203
205
|
.mi-0\.5 { margin-inline: var(--size-0_5); }
|
204
206
|
.mi-1 { margin-inline: var(--size-1); }
|
205
207
|
.mi-2 { margin-inline: var(--size-2); }
|
206
|
-
.mi-3 { margin-inline: var(--size-3); }
|
207
208
|
.mi-4 { margin-inline: var(--size-4); }
|
208
209
|
.mi-6 { margin-inline: var(--size-6); }
|
209
210
|
.mi-8 { margin-inline: var(--size-8); }
|
@@ -214,7 +215,6 @@
|
|
214
215
|
.mis-0\.5 { margin-inline-start: var(--size-0_5); }
|
215
216
|
.mis-1 { margin-inline-start: var(--size-1); }
|
216
217
|
.mis-2 { margin-inline-start: var(--size-2); }
|
217
|
-
.mis-3 { margin-inline-start: var(--size-3); }
|
218
218
|
.mis-4 { margin-inline-start: var(--size-4); }
|
219
219
|
.mis-6 { margin-inline-start: var(--size-6); }
|
220
220
|
.mis-8 { margin-inline-start: var(--size-8); }
|
@@ -225,7 +225,6 @@
|
|
225
225
|
.mie-0\.5 { margin-inline-end: var(--size-0_5); }
|
226
226
|
.mie-1 { margin-inline-end: var(--size-1); }
|
227
227
|
.mie-2 { margin-inline-end: var(--size-2); }
|
228
|
-
.mie-3 { margin-inline-end: var(--size-3); }
|
229
228
|
.mie-4 { margin-inline-end: var(--size-4); }
|
230
229
|
.mie-6 { margin-inline-end: var(--size-6); }
|
231
230
|
.mie-8 { margin-inline-end: var(--size-8); }
|
@@ -239,7 +238,6 @@
|
|
239
238
|
.p-0\.5 { padding: var(--size-0_5); }
|
240
239
|
.p-1 { padding: var(--size-1); }
|
241
240
|
.p-2 { padding: var(--size-2); }
|
242
|
-
.p-3 { padding: var(--size-3); }
|
243
241
|
.p-4 { padding: var(--size-4); }
|
244
242
|
.p-6 { padding: var(--size-6); }
|
245
243
|
.p-8 { padding: var(--size-8); }
|
@@ -249,7 +247,6 @@
|
|
249
247
|
.pb-0\.5 { padding-block: var(--size-0_5); }
|
250
248
|
.pb-1 { padding-block: var(--size-1); }
|
251
249
|
.pb-2 { padding-block: var(--size-2); }
|
252
|
-
.pb-3 { padding-block: var(--size-3); }
|
253
250
|
.pb-4 { padding-block: var(--size-4); }
|
254
251
|
.pb-6 { padding-block: var(--size-6); }
|
255
252
|
.pb-8 { padding-block: var(--size-8); }
|
@@ -259,7 +256,6 @@
|
|
259
256
|
.pbs-0\.5 { padding-block-start: var(--size-0_5); }
|
260
257
|
.pbs-1 { padding-block-start: var(--size-1); }
|
261
258
|
.pbs-2 { padding-block-start: var(--size-2); }
|
262
|
-
.pbs-3 { padding-block-start: var(--size-3); }
|
263
259
|
.pbs-4 { padding-block-start: var(--size-4); }
|
264
260
|
.pbs-6 { padding-block-start: var(--size-6); }
|
265
261
|
.pbs-8 { padding-block-start: var(--size-8); }
|
@@ -269,7 +265,6 @@
|
|
269
265
|
.pbe-0\.5 { padding-block-end: var(--size-0_5); }
|
270
266
|
.pbe-1 { padding-block-end: var(--size-1); }
|
271
267
|
.pbe-2 { padding-block-end: var(--size-2); }
|
272
|
-
.pbe-3 { padding-block-end: var(--size-3); }
|
273
268
|
.pbe-4 { padding-block-end: var(--size-4); }
|
274
269
|
.pbe-6 { padding-block-end: var(--size-6); }
|
275
270
|
.pbe-8 { padding-block-end: var(--size-8); }
|
@@ -279,7 +274,6 @@
|
|
279
274
|
.pi-0\.5 { padding-inline: var(--size-0_5); }
|
280
275
|
.pi-1 { padding-inline: var(--size-1); }
|
281
276
|
.pi-2 { padding-inline: var(--size-2); }
|
282
|
-
.pi-3 { padding-inline: var(--size-3); }
|
283
277
|
.pi-4 { padding-inline: var(--size-4); }
|
284
278
|
.pi-6 { padding-inline: var(--size-6); }
|
285
279
|
.pi-8 { padding-inline: var(--size-8); }
|
@@ -289,7 +283,6 @@
|
|
289
283
|
.pis-0\.5 { padding-inline-start: var(--size-0_5); }
|
290
284
|
.pis-1 { padding-inline-start: var(--size-1); }
|
291
285
|
.pis-2 { padding-inline-start: var(--size-2); }
|
292
|
-
.pis-3 { padding-inline-start: var(--size-3); }
|
293
286
|
.pis-4 { padding-inline-start: var(--size-4); }
|
294
287
|
.pis-6 { padding-inline-start: var(--size-6); }
|
295
288
|
.pis-8 { padding-inline-start: var(--size-8); }
|
@@ -299,7 +292,6 @@
|
|
299
292
|
.pie-0\.5 { padding-inline-end: var(--size-0_5); }
|
300
293
|
.pie-1 { padding-inline-end: var(--size-1); }
|
301
294
|
.pie-2 { padding-inline-end: var(--size-2); }
|
302
|
-
.pie-3 { padding-inline-end: var(--size-3); }
|
303
295
|
.pie-4 { padding-inline-end: var(--size-4); }
|
304
296
|
.pie-6 { padding-inline-end: var(--size-6); }
|
305
297
|
.pie-8 { padding-inline-end: var(--size-8); }
|
data/lib/css_zero/version.rb
CHANGED
@@ -2,7 +2,7 @@ Description:
|
|
2
2
|
This will add components into your project.
|
3
3
|
|
4
4
|
Components:
|
5
|
-
accordion alert avatar badge breadcrumb button card collapsible dialog input progress switch table
|
5
|
+
accordion alert avatar badge breadcrumb button card collapsible dialog input pagination progress prose switch table
|
6
6
|
|
7
7
|
Example:
|
8
8
|
bin/rails generate css_zero:add [components...]
|
@@ -24,8 +24,15 @@ dialog:
|
|
24
24
|
input:
|
25
25
|
- app/assets/stylesheets/input.css
|
26
26
|
- app/assets/images/select-arrow.svg
|
27
|
+
pagination:
|
28
|
+
- app/assets/stylesheets/pagination.css
|
29
|
+
- app/assets/images/chevron-right.svg
|
30
|
+
- app/assets/images/chevron-left.svg
|
31
|
+
- app/assets/images/ellipsis.svg
|
27
32
|
progress:
|
28
33
|
- app/assets/stylesheets/progress.css
|
34
|
+
prose:
|
35
|
+
- app/assets/stylesheets/prose.css
|
29
36
|
switch:
|
30
37
|
- app/assets/stylesheets/switch.css
|
31
38
|
table:
|
@@ -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="m15 18-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"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>
|
@@ -1,13 +1,11 @@
|
|
1
|
-
:root {
|
2
|
-
--avatar-size: var(--size-10);
|
3
|
-
}
|
4
|
-
|
5
1
|
.avatar {
|
6
|
-
|
2
|
+
--size: var(--avatar-size, var(--size-10));
|
3
|
+
|
4
|
+
block-size: var(--size);
|
7
5
|
border-radius: var(--rounded-full);
|
8
6
|
display: flex;
|
9
7
|
flex-shrink: 0;
|
10
|
-
inline-size: var(--
|
8
|
+
inline-size: var(--size);
|
11
9
|
overflow: hidden;
|
12
10
|
|
13
11
|
img {
|
@@ -20,12 +18,12 @@
|
|
20
18
|
|
21
19
|
.avatar__fallback {
|
22
20
|
align-items: center;
|
23
|
-
background-color: var(--color-
|
21
|
+
background-color: var(--color-border-light);
|
24
22
|
block-size: var(--size-full);
|
25
23
|
border-radius: var(--rounded-full);
|
26
24
|
display: flex;
|
27
|
-
font-size: calc(var(--
|
25
|
+
font-size: calc(var(--size) * .4);
|
28
26
|
inline-size: var(--size-full);
|
29
27
|
justify-content: center;
|
30
28
|
user-select: none;
|
31
|
-
}
|
29
|
+
}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
.badge {
|
2
|
+
align-items: center;
|
2
3
|
background-color: var(--badge-background, var(--color-primary));
|
3
4
|
border-radius: var(--rounded-full);
|
4
5
|
border-width: var(--badge-border-width, 0);
|
5
6
|
color: var(--badge-color, var(--color-text-reversed));
|
7
|
+
display: inline-flex;
|
6
8
|
font-size: var(--text-xs);
|
7
9
|
font-weight: var(--font-semibold);
|
8
10
|
padding: var(--size-0_5) var(--size-2_5);
|
@@ -15,8 +17,8 @@
|
|
15
17
|
|
16
18
|
.badge--outline {
|
17
19
|
--badge-background: transparent;
|
20
|
+
--badge-border-width: var(--border);
|
18
21
|
--badge-color: var(--color-text);
|
19
|
-
--btn-border-width: var(--border);
|
20
22
|
}
|
21
23
|
|
22
24
|
.badge--positive {
|
@@ -6,7 +6,7 @@
|
|
6
6
|
color: var(--color-text);
|
7
7
|
inline-size: var(--size-full);
|
8
8
|
margin: auto;
|
9
|
-
max-inline-size: var(--width-lg);
|
9
|
+
max-inline-size: var(--dialog-width, var(--width-lg));
|
10
10
|
padding: var(--size-6);
|
11
11
|
|
12
12
|
&::backdrop {
|
@@ -49,7 +49,10 @@
|
|
49
49
|
|
50
50
|
/* Small screens and below */
|
51
51
|
@media (width < 40rem) {
|
52
|
-
border-radius: 0;
|
52
|
+
border-end-end-radius: 0;
|
53
|
+
border-end-start-radius: 0;
|
54
|
+
margin-block-end: 0;
|
55
|
+
max-inline-size: none !important;
|
53
56
|
}
|
54
57
|
}
|
55
58
|
|
@@ -57,6 +60,11 @@
|
|
57
60
|
inset-block-start: var(--size-4);
|
58
61
|
inset-inline-end: var(--size-4);
|
59
62
|
position: absolute;
|
63
|
+
|
64
|
+
/* Small screens and below */
|
65
|
+
@media (width < 40rem) {
|
66
|
+
display: none;
|
67
|
+
}
|
60
68
|
}
|
61
69
|
|
62
70
|
/* Prevent page scroll when dialog is open */
|
@@ -4,10 +4,20 @@
|
|
4
4
|
border-color: var(--color-border);
|
5
5
|
border-radius: var(--rounded-md);
|
6
6
|
border-width: var(--border);
|
7
|
-
box-shadow: var(--shadow-xs);
|
8
7
|
font-size: var(--text-sm);
|
9
8
|
inline-size: var(--size-full);
|
10
9
|
padding: var(--size-2) var(--size-3);
|
10
|
+
resize: none;
|
11
|
+
|
12
|
+
option {
|
13
|
+
padding-block: var(--size-1);
|
14
|
+
}
|
15
|
+
|
16
|
+
&:is(textarea):not([rows]) {
|
17
|
+
field-sizing: content;
|
18
|
+
max-block-size: calc(10lh + var(--size-6));
|
19
|
+
min-block-size: calc(3lh + var(--size-6));
|
20
|
+
}
|
11
21
|
|
12
22
|
&:is(select):not([multiple], [size]) {
|
13
23
|
background-image: url("select-arrow.svg");
|
@@ -44,8 +54,15 @@
|
|
44
54
|
transform: scale(1.15);
|
45
55
|
}
|
46
56
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
57
|
+
:is(.input, .range, .checkbox, .radio) {
|
58
|
+
/* Keyboard navigation */
|
59
|
+
&:focus-visible {
|
60
|
+
outline: var(--border-2) solid var(--color-primary);
|
61
|
+
outline-offset: var(--border-2);
|
62
|
+
}
|
63
|
+
|
64
|
+
/* Server side validation */
|
65
|
+
.field_with_errors & {
|
66
|
+
border-color: var(--color-negative);
|
67
|
+
}
|
51
68
|
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
:where(.pagination) {
|
2
|
+
align-items: center;
|
3
|
+
display: flex;
|
4
|
+
gap: var(--size-1);
|
5
|
+
|
6
|
+
img {
|
7
|
+
filter: var(--color-filter-text);
|
8
|
+
}
|
9
|
+
|
10
|
+
a {
|
11
|
+
align-items: center;
|
12
|
+
border-radius: var(--rounded-md);
|
13
|
+
display: inline-flex;
|
14
|
+
font-size: var(--text-sm);
|
15
|
+
font-weight: var(--font-medium);
|
16
|
+
gap: var(--size-2);
|
17
|
+
justify-content: center;
|
18
|
+
min-inline-size: fit-content;
|
19
|
+
padding: var(--size-2) var(--size-4);
|
20
|
+
}
|
21
|
+
|
22
|
+
a:is([aria-current]) {
|
23
|
+
border-width: var(--border);
|
24
|
+
}
|
25
|
+
|
26
|
+
a:is([aria-disabled]) {
|
27
|
+
pointer-events: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
a:not([aria-disabled]):hover {
|
31
|
+
background-color: var(--color-border-light);
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
:where(.prose) {
|
2
|
+
-moz-osx-font-smoothing: grayscale;
|
3
|
+
-webkit-font-smoothing: antialiased;
|
4
|
+
font-size: clamp(1rem, 2.5cqi, 1.4rem);
|
5
|
+
|
6
|
+
:is(h1, h2, h3, h4, h5, h6) {
|
7
|
+
font-weight: 800;
|
8
|
+
hyphens: auto;
|
9
|
+
letter-spacing: -0.02ch;
|
10
|
+
line-height: 1.1;
|
11
|
+
margin-block: 0.65em;
|
12
|
+
overflow-wrap: break-word;
|
13
|
+
text-wrap: balance;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
font-size: 2em;
|
18
|
+
}
|
19
|
+
|
20
|
+
h2 {
|
21
|
+
font-size: 1.5em;
|
22
|
+
}
|
23
|
+
|
24
|
+
h3 {
|
25
|
+
font-size: 1.17em;
|
26
|
+
}
|
27
|
+
|
28
|
+
h4 {
|
29
|
+
font-size: 1em;
|
30
|
+
}
|
31
|
+
|
32
|
+
h5 {
|
33
|
+
font-size: 0.83em;
|
34
|
+
}
|
35
|
+
|
36
|
+
h6 {
|
37
|
+
font-size: 0.67em;
|
38
|
+
}
|
39
|
+
|
40
|
+
:is(ul, ol, menu) {
|
41
|
+
list-style: revert;
|
42
|
+
padding-inline-start: revert;
|
43
|
+
}
|
44
|
+
|
45
|
+
:is(p, ul, ol, dl, blockquote, pre, figure, table, hr) {
|
46
|
+
margin-block: 0.65lh;
|
47
|
+
overflow-wrap: break-word;
|
48
|
+
text-wrap: pretty;
|
49
|
+
}
|
50
|
+
|
51
|
+
hr {
|
52
|
+
border-color: var(--color-border-dark);
|
53
|
+
border-style: var(--border-style, solid) none none;
|
54
|
+
margin: 2lh auto;
|
55
|
+
}
|
56
|
+
|
57
|
+
:is(b, strong) {
|
58
|
+
font-weight: 700;
|
59
|
+
}
|
60
|
+
|
61
|
+
:is(pre, code) {
|
62
|
+
background-color: var(--color-border-light);
|
63
|
+
border: 1px solid var(--color-border);
|
64
|
+
border-radius: 0.3em;
|
65
|
+
font-family: var(--font-monospace-code);
|
66
|
+
font-size: 0.85em;
|
67
|
+
}
|
68
|
+
|
69
|
+
code {
|
70
|
+
padding: 0.1em 0.3em;
|
71
|
+
white-space: pre-wrap;
|
72
|
+
}
|
73
|
+
|
74
|
+
pre {
|
75
|
+
border-radius: 0.5em;
|
76
|
+
padding: 0.5lh 2ch;
|
77
|
+
}
|
78
|
+
|
79
|
+
pre code {
|
80
|
+
background-color: transparent;
|
81
|
+
border: 0;
|
82
|
+
font-size: 1em;
|
83
|
+
padding: 0;
|
84
|
+
}
|
85
|
+
|
86
|
+
p {
|
87
|
+
hyphens: auto;
|
88
|
+
letter-spacing: -0.005ch;
|
89
|
+
}
|
90
|
+
|
91
|
+
blockquote {
|
92
|
+
font-style: italic;
|
93
|
+
margin: 0 3ch;
|
94
|
+
}
|
95
|
+
|
96
|
+
blockquote p {
|
97
|
+
hyphens: none;
|
98
|
+
}
|
99
|
+
|
100
|
+
table {
|
101
|
+
border: 1px solid var(--color-border-dark);
|
102
|
+
border-collapse: collapse;
|
103
|
+
margin: 1lh 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
th {
|
107
|
+
font-weight: 700;
|
108
|
+
}
|
109
|
+
|
110
|
+
:is(th, td) {
|
111
|
+
border: 1px solid var(--color-border-dark);
|
112
|
+
padding: 0.2lh 1ch;
|
113
|
+
text-align: start;
|
114
|
+
}
|
115
|
+
|
116
|
+
th {
|
117
|
+
border-block-end-width: 3px;
|
118
|
+
}
|
119
|
+
|
120
|
+
del {
|
121
|
+
background-color: hsl(from var(--color-negative) h s l / .1);
|
122
|
+
color: var(--color-negative);
|
123
|
+
}
|
124
|
+
|
125
|
+
ins {
|
126
|
+
background-color: hsl(from var(--color-positive) h s l / .1);
|
127
|
+
color: var(--color-positive);
|
128
|
+
}
|
129
|
+
|
130
|
+
a {
|
131
|
+
color: var(--blue-700);
|
132
|
+
text-decoration: underline;
|
133
|
+
text-decoration-skip-ink: auto;
|
134
|
+
}
|
135
|
+
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
2
|
|
3
3
|
export default class extends Controller {
|
4
|
-
static targets = [ "
|
4
|
+
static targets = [ "details" ]
|
5
|
+
|
6
|
+
open() {
|
7
|
+
this.detailsTarget.open = true
|
8
|
+
}
|
9
|
+
|
10
|
+
close() {
|
11
|
+
this.detailsTarget.open = false
|
12
|
+
}
|
5
13
|
|
6
14
|
toggle() {
|
7
|
-
this.
|
15
|
+
this.detailsTarget.open ? this.close() : this.open()
|
8
16
|
}
|
9
17
|
}
|
@@ -4,8 +4,9 @@
|
|
4
4
|
--color-text: black;
|
5
5
|
--color-text-reversed: white;
|
6
6
|
--color-text-subtle: var(--zinc-500);
|
7
|
+
--color-border-light: var(--zinc-100);
|
7
8
|
--color-border: var(--zinc-200);
|
8
|
-
--color-border-
|
9
|
+
--color-border-dark: var(--zinc-400);
|
9
10
|
|
10
11
|
/* Accent colors */
|
11
12
|
--color-primary: var(--zinc-900);
|
@@ -26,8 +27,9 @@
|
|
26
27
|
--color-text: white;
|
27
28
|
--color-text-reversed: black;
|
28
29
|
--color-text-subtle: var(--zinc-400);
|
30
|
+
--color-border-light: var(--zinc-800);
|
29
31
|
--color-border: var(--zinc-800);
|
30
|
-
--color-border-
|
32
|
+
--color-border-dark: var(--zinc-600);
|
31
33
|
|
32
34
|
/* Accent colors */
|
33
35
|
--color-primary: var(--zinc-50);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lázaro Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- app/assets/stylesheets/transition.css
|
31
31
|
- app/assets/stylesheets/typography.css
|
32
32
|
- app/assets/stylesheets/zutilities.css
|
33
|
+
- app/helpers/dialog_helper.rb
|
33
34
|
- lib/css-zero.rb
|
34
35
|
- lib/css_zero/engine.rb
|
35
36
|
- lib/css_zero/version.rb
|
@@ -37,8 +38,10 @@ files:
|
|
37
38
|
- lib/generators/css_zero/add/add_generator.rb
|
38
39
|
- lib/generators/css_zero/add/resources.yml
|
39
40
|
- lib/generators/css_zero/add/templates/app/assets/images/chevron-down.svg
|
41
|
+
- lib/generators/css_zero/add/templates/app/assets/images/chevron-left.svg
|
40
42
|
- lib/generators/css_zero/add/templates/app/assets/images/chevron-right.svg
|
41
43
|
- lib/generators/css_zero/add/templates/app/assets/images/circle-alert.svg
|
44
|
+
- lib/generators/css_zero/add/templates/app/assets/images/ellipsis.svg
|
42
45
|
- lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg
|
43
46
|
- lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg
|
44
47
|
- lib/generators/css_zero/add/templates/app/assets/images/x.svg
|
@@ -51,7 +54,9 @@ files:
|
|
51
54
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css
|
52
55
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css
|
53
56
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
|
57
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/pagination.css
|
54
58
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css
|
59
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/prose.css
|
55
60
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css
|
56
61
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/table.css
|
57
62
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
|