css-zero 0.0.10 → 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 +300 -102
- data/app/assets/stylesheets/_reset.css +1 -1
- data/app/assets/stylesheets/colors.css +0 -26
- data/app/assets/stylesheets/transform.css +32 -40
- data/app/assets/stylesheets/transition.css +2 -7
- data/app/assets/stylesheets/zutilities.css +43 -9
- 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/{app/assets/stylesheets/buttons.css → lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css} +32 -14
- 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 -5
- data/app/assets/stylesheets/dialog.css +0 -33
- data/app/assets/stylesheets/inputs.css +0 -54
@@ -0,0 +1,46 @@
|
|
1
|
+
:root {
|
2
|
+
/* Color Scheme */
|
3
|
+
color-scheme: light dark;
|
4
|
+
|
5
|
+
/* Abstractions */
|
6
|
+
--color-bg: light-dark(white, var(--zinc-950));
|
7
|
+
--color-text: light-dark(black, white);
|
8
|
+
--color-text-reversed: light-dark(white, black);
|
9
|
+
--color-text-subtle: light-dark(var(--zinc-500), var(--zinc-400));
|
10
|
+
--color-border: light-dark(var(--zinc-200), var(--zinc-800));
|
11
|
+
--color-border-darker: light-dark(var(--zinc-400), var(--zinc-300));
|
12
|
+
|
13
|
+
/* Accent colors */
|
14
|
+
--color-primary: light-dark(var(--zinc-900), var(--zinc-50));
|
15
|
+
--color-secondary: light-dark(var(--zinc-100), var(--zinc-800));
|
16
|
+
--color-negative: light-dark(var(--red-600), var(--red-900));
|
17
|
+
--color-positive: light-dark(var(--green-600), var(--green-900));
|
18
|
+
|
19
|
+
/* SVG color values */
|
20
|
+
--color-filter-text: invert(0);
|
21
|
+
--color-filter-text-reversed: invert(100%);
|
22
|
+
--color-filter-negative: invert(31%) sepia(96%) saturate(4646%) hue-rotate(350deg) brightness(91%) contrast(89%);
|
23
|
+
--color-filter-positive: invert(48%) sepia(74%) saturate(520%) hue-rotate(90deg) brightness(89%) contrast(90%);
|
24
|
+
|
25
|
+
@media (prefers-color-scheme: dark) {
|
26
|
+
--color-filter-text: invert(100%);
|
27
|
+
--color-filter-text-reversed: invert(0);
|
28
|
+
--color-filter-negative: invert(15%) sepia(83%) saturate(2066%) hue-rotate(345deg) brightness(87%) contrast(88%);
|
29
|
+
--color-filter-positive: invert(23%) sepia(74%) saturate(495%) hue-rotate(91deg) brightness(88%) contrast(89%);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
* {
|
34
|
+
border-color: var(--color-border);
|
35
|
+
}
|
36
|
+
|
37
|
+
html {
|
38
|
+
scroll-behavior: smooth;
|
39
|
+
}
|
40
|
+
|
41
|
+
body {
|
42
|
+
background-color: var(--color-bg);
|
43
|
+
color: var(--color-text);
|
44
|
+
font-synthesis-weight: none;
|
45
|
+
text-rendering: optimizeLegibility;
|
46
|
+
}
|
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.11
|
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-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -21,20 +21,40 @@ files:
|
|
21
21
|
- app/assets/stylesheets/_reset.css
|
22
22
|
- app/assets/stylesheets/animations.css
|
23
23
|
- app/assets/stylesheets/borders.css
|
24
|
-
- app/assets/stylesheets/buttons.css
|
25
24
|
- app/assets/stylesheets/colors.css
|
26
|
-
- app/assets/stylesheets/dialog.css
|
27
25
|
- app/assets/stylesheets/effects.css
|
28
26
|
- app/assets/stylesheets/filters.css
|
29
27
|
- app/assets/stylesheets/grid.css
|
30
|
-
- app/assets/stylesheets/inputs.css
|
31
28
|
- app/assets/stylesheets/sizes.css
|
32
29
|
- app/assets/stylesheets/transform.css
|
33
30
|
- app/assets/stylesheets/transition.css
|
34
31
|
- app/assets/stylesheets/typography.css
|
35
32
|
- app/assets/stylesheets/zutilities.css
|
36
33
|
- lib/css-zero.rb
|
34
|
+
- lib/css_zero/engine.rb
|
37
35
|
- lib/css_zero/version.rb
|
36
|
+
- lib/generators/css_zero/add/USAGE
|
37
|
+
- lib/generators/css_zero/add/add_generator.rb
|
38
|
+
- lib/generators/css_zero/add/resources.yml
|
39
|
+
- lib/generators/css_zero/add/templates/app/assets/images/chevron-down.svg
|
40
|
+
- lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg
|
41
|
+
- lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg
|
42
|
+
- lib/generators/css_zero/add/templates/app/assets/images/x.svg
|
43
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css
|
44
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css
|
45
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/alert_dialog.css
|
46
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/badge.css
|
47
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
|
48
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css
|
49
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css
|
50
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
|
51
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css
|
52
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css
|
53
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/table.css
|
54
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_control_controller.js
|
55
|
+
- lib/generators/css_zero/install/USAGE
|
56
|
+
- lib/generators/css_zero/install/install_generator.rb
|
57
|
+
- lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css
|
38
58
|
homepage: https://github.com/lazaronixon/css-zero
|
39
59
|
licenses:
|
40
60
|
- MIT
|
@@ -1,33 +0,0 @@
|
|
1
|
-
.dialog {
|
2
|
-
background-color: var(--dialog-background, var(--color-bg));
|
3
|
-
border: 1px solid var(--dialog-border-color, var(--color-border));
|
4
|
-
border-radius: var(--dialog-border-radius, var(--rounded-lg));
|
5
|
-
box-shadow: var(--dialog-shadow, var(--shadow-lg));
|
6
|
-
margin: auto; inline-size: 100%;
|
7
|
-
max-inline-size: var(--dialog-size, var(--width-lg));
|
8
|
-
padding: var(--dialog-padding, var(--size-6));
|
9
|
-
|
10
|
-
&::backdrop {
|
11
|
-
background-color: var(--dialog-backdrop-background, #000c);
|
12
|
-
}
|
13
|
-
|
14
|
-
/* Setup transition */
|
15
|
-
&, &::backdrop {
|
16
|
-
opacity: 0; transition: all var(--time-300) allow-discrete;
|
17
|
-
}
|
18
|
-
|
19
|
-
/* Fade in */
|
20
|
-
&[open], &[open]::backdrop {
|
21
|
-
opacity: 1
|
22
|
-
}
|
23
|
-
|
24
|
-
/* Fade out */
|
25
|
-
@starting-style {
|
26
|
-
&[open], &[open]::backdrop { opacity: 0; }
|
27
|
-
}
|
28
|
-
|
29
|
-
/* Responsiveness */
|
30
|
-
@media (width <= 40rem) {
|
31
|
-
border-radius: 0;
|
32
|
-
}
|
33
|
-
}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
.input {
|
2
|
-
appearance: none;
|
3
|
-
background-color: var(--input-background, transparent);
|
4
|
-
border-radius: var(--input-border-radius, var(--rounded-md));
|
5
|
-
border: 1px solid var(--input-border-color, var(--color-border));
|
6
|
-
box-shadow: var(--input-shadow, var(--shadow-xs));
|
7
|
-
color: var(--input-color, var(--color-text));
|
8
|
-
font-size: var(--input-font-size, var(--text-sm));
|
9
|
-
inline-size: 100%;
|
10
|
-
padding: var(--input-padding, .5rem .75rem);
|
11
|
-
|
12
|
-
&::file-selector-button {
|
13
|
-
font-weight: var(--font-medium);
|
14
|
-
margin-inline-end: var(--size-2);
|
15
|
-
}
|
16
|
-
|
17
|
-
&:is(textarea) {
|
18
|
-
field-sizing: content;
|
19
|
-
min-block-size: var(--input-lines, 4lh);
|
20
|
-
resize: none;
|
21
|
-
}
|
22
|
-
|
23
|
-
&:is(select):not([multiple]) {
|
24
|
-
background-image: var(--icon-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(113,113,122)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E"));
|
25
|
-
background-position: center right var(--icon-chevron-padding, .75rem);
|
26
|
-
background-size: 1rem auto;
|
27
|
-
background-repeat: no-repeat;
|
28
|
-
}
|
29
|
-
|
30
|
-
&:focus-visible {
|
31
|
-
outline: 2px solid var(--color-selected);
|
32
|
-
outline-offset: var(--border-2);
|
33
|
-
}
|
34
|
-
|
35
|
-
&:disabled {
|
36
|
-
cursor: not-allowed;
|
37
|
-
opacity: var(--opacity-50);
|
38
|
-
}
|
39
|
-
|
40
|
-
&::placeholder {
|
41
|
-
color: var(--color-text-subtle);
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
[type="checkbox"], [type="radio"] {
|
46
|
-
accent-color: var(--check-color, var(--color-primary));
|
47
|
-
height: var(--check-size, var(--size-4));
|
48
|
-
width: var(--check-size, var(--size-4));
|
49
|
-
|
50
|
-
&:focus-visible {
|
51
|
-
outline: 2px solid var(--color-selected);
|
52
|
-
outline-offset: var(--border-2);
|
53
|
-
}
|
54
|
-
}
|