css-zero 0.0.9 → 0.0.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1f5501303185bf9a119ea52aaaf5cbc03cef023cb3cd3fc2f3f884239d130e5
4
- data.tar.gz: 49ca85bd7206b421c6ea37b5ad672beeaa0824843d3d4e9c7c97077d8044c75d
3
+ metadata.gz: 1627717e8a9e7cedf50a2bf68f7fff9eb3b9a36991d6b9a68dc54271d6a035a2
4
+ data.tar.gz: 6a5fbdf78fe2d73522011672a7b3b536a001e0eeb5953a4ffc7171aca361bfab
5
5
  SHA512:
6
- metadata.gz: 7a5bd42832b1db0e2be98bea5421743311af95e1252f62a4b71497bee8e487172b914fe999b9dfecf507d267d4f4b8fb2292c4d18f967341550bb235acfa61ee
7
- data.tar.gz: 99d987f57ca8c09000ac836ed175c6ad288af18d50b8a54fc8eff06523f7fb354e71208fcc40e6a4c99c12cb7932564698746124805639b69830bc602537514e
6
+ metadata.gz: 4efd2234d0690ea705ccd894db2b5d89bce059177f7620d65f0e1d998bf41e94a6470a626b4600e96b1cb99ea9c2e77d95c8e7961569c3a8908045ee1bc2a8af
7
+ data.tar.gz: 83c1cef52f7a3f328af20e97720464c8043d63da94b8694d20b74fdd80762a5c838f624fc4b52ef9224d3e4fcf49fe4993ffc1bc010a49d248af24ba21a821d0
data/README.md CHANGED
@@ -70,15 +70,20 @@ Check the [CSS files](app/assets/stylesheets) in the repository for reference.
70
70
 
71
71
  ## Inputs
72
72
 
73
- <img width="469" alt="Inputs" src="https://github.com/lazaronixon/css-zero/assets/2651240/987201b3-2583-43af-b1f2-db6af1eabbaa">
73
+ <img width="436" alt="Inputs" src="https://github.com/lazaronixon/css-zero/assets/2651240/9935df82-606f-4ebb-bfd7-d18c9bc8b5f5">
74
74
 
75
- ```html+erb
75
+ ```html
76
76
  <div class="flex flex-col w-full gap" style="max-inline-size: 24rem;">
77
77
  <div class="flex flex-col grow gap-small">
78
78
  <label for="name_field" class="text-sm font-medium">Full name</label>
79
79
  <input type="text" id="name_field" class="input">
80
80
  </div>
81
81
 
82
+ <div class="flex flex-col grow gap-small">
83
+ <label for="date_field" class="text-sm font-medium">Date picker</label>
84
+ <input type="date" id="date_field" class="input">
85
+ </div>
86
+
82
87
  <div class="flex flex-col grow gap-small">
83
88
  <label for="file_field" class="text-sm font-medium">File</label>
84
89
  <input type="file" id="file_field" class="input">
@@ -106,21 +111,20 @@ Check the [CSS files](app/assets/stylesheets) in the repository for reference.
106
111
 
107
112
  ## Buttons
108
113
 
109
- <img width="779" alt="Buttons" src="https://github.com/lazaronixon/css-zero/assets/2651240/ea0bdafe-7bd9-46a4-a87c-b11dd0836707">
114
+ <img width="783" alt="image" src="https://github.com/lazaronixon/css-zero/assets/2651240/4e6a6829-5dd0-4eff-9b2f-33c9de85d3ef">
110
115
 
111
- ```html+erb
112
- <div class="flex items-center gap">
113
- <button class="btn">Primary button</button>
114
- <button class="btn btn--outline">Outline button</button>
115
- <button class="btn btn--plain">Plain button</button>
116
+ ```html
117
+ <div class="flex justify-center gap">
118
+ <button class="btn">Primary</button>
119
+ <button class="btn btn--secondary">Secondary</button>
120
+ <button class="btn btn--outline">Outline</button>
121
+ <button class="btn btn--plain">Plain</button>
122
+ <button class="btn btn--positive">Positive</button>
123
+ <button class="btn btn--negative">Negative</button>
116
124
 
117
125
  <button class="btn">
118
126
  <%= image_tag "plus.svg", role: "presentation", size: 20 %>
119
- <span>Icon button</span>
120
- </button>
121
-
122
- <button class="btn" style="--btn-background: #67e8f9; --btn-color: #083344;">
123
- Custom button
127
+ <span>With icon</span>
124
128
  </button>
125
129
  </div>
126
130
  ```
@@ -129,7 +133,7 @@ Check the [CSS files](app/assets/stylesheets) in the repository for reference.
129
133
 
130
134
  <img width="572" alt="Dialog" src="https://github.com/lazaronixon/css-zero/assets/2651240/381dd7eb-8024-4ffc-992a-d47d370a3c24">
131
135
 
132
- ```html+erb
136
+ ```html
133
137
  <dialog id="my_modal" class="dialog">
134
138
  <h1 class="text-lg font-semibold">Are you absolutely sure?</h1>
135
139
  <p class="text-sm text-subtle mbs-2">This action cannot be undone. This will permanently delete your account and remove your data from our servers.</p>
@@ -18,12 +18,23 @@
18
18
  filter: var(--btn-icon-color, var(--color-filter-text-reversed));
19
19
  }
20
20
 
21
+ &:focus-visible {
22
+ outline: 2px solid var(--color-selected);
23
+ outline-offset: var(--border-2);
24
+ }
25
+
21
26
  &:disabled {
22
27
  opacity: var(--opacity-50);
23
28
  pointer-events: none;
24
29
  }
25
30
  }
26
31
 
32
+ .btn--secondary {
33
+ --btn-background: var(--color-secondary);
34
+ --btn-color: var(--color-text);
35
+ --btn-icon-color: var(--color-filter-text);
36
+ }
37
+
27
38
  .btn--outline {
28
39
  --btn-background: transparent;
29
40
  --btn-border-color: var(--color-border);
@@ -39,8 +50,10 @@
39
50
 
40
51
  .btn--positive {
41
52
  --btn-background: var(--color-positive);
53
+ --btn-color: white;
42
54
  }
43
55
 
44
56
  .btn--negative {
45
57
  --btn-background: var(--color-negative);
58
+ --btn-color: white;
46
59
  }
@@ -271,13 +271,14 @@
271
271
  --color-text: light-dark(var(--zinc-950), var(--zinc-50));
272
272
  --color-text-reversed: light-dark(var(--zinc-50), var(--zinc-950));
273
273
  --color-text-subtle: light-dark(var(--zinc-500), var(--zinc-400));
274
- --color-border-light: light-dark(var(--zinc-100), var(--zinc-900));
274
+ --color-selected: light-dark(var(--zinc-400), var(--zinc-300));
275
275
  --color-border: light-dark(var(--zinc-200), var(--zinc-800));
276
276
 
277
277
  /* Accent colors */
278
- --color-primary: light-dark(var(--zinc-900), var(--zinc-50));
279
- --color-negative: light-dark(var(--red-600), var(--red-900));
280
- --color-positive: light-dark(var(--green-600), var(--green-900));
278
+ --color-primary: light-dark(var(--zinc-900), var(--zinc-50));
279
+ --color-secondary: light-dark(var(--zinc-100), var(--zinc-800));
280
+ --color-negative: light-dark(var(--red-600), var(--red-900));
281
+ --color-positive: light-dark(var(--green-600), var(--green-900));
281
282
 
282
283
  /* Filtered color values */
283
284
  --color-filter-text: invert(5%) sepia(10%) saturate(497%) hue-rotate(201deg) brightness(96%) contrast(102%);
@@ -3,7 +3,6 @@
3
3
  border: 1px solid var(--dialog-border-color, var(--color-border));
4
4
  border-radius: var(--dialog-border-radius, var(--rounded-lg));
5
5
  box-shadow: var(--dialog-shadow, var(--shadow-lg));
6
- color: var(--dialog-color, var(--color-text));
7
6
  margin: auto; inline-size: 100%;
8
7
  max-inline-size: var(--dialog-size, var(--width-lg));
9
8
  padding: var(--dialog-padding, var(--size-6));
@@ -4,6 +4,7 @@
4
4
  border-radius: var(--input-border-radius, var(--rounded-md));
5
5
  border: 1px solid var(--input-border-color, var(--color-border));
6
6
  box-shadow: var(--input-shadow, var(--shadow-xs));
7
+ color: var(--input-color, var(--color-text));
7
8
  font-size: var(--input-font-size, var(--text-sm));
8
9
  inline-size: 100%;
9
10
  padding: var(--input-padding, .5rem .75rem);
@@ -26,6 +27,11 @@
26
27
  background-repeat: no-repeat;
27
28
  }
28
29
 
30
+ &:focus-visible {
31
+ outline: 2px solid var(--color-selected);
32
+ outline-offset: var(--border-2);
33
+ }
34
+
29
35
  &:disabled {
30
36
  cursor: not-allowed;
31
37
  opacity: var(--opacity-50);
@@ -37,7 +43,12 @@
37
43
  }
38
44
 
39
45
  [type="checkbox"], [type="radio"] {
40
- accent-color: var(--color-primary);
46
+ accent-color: var(--check-color, var(--color-primary));
41
47
  height: var(--check-size, var(--size-4));
42
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
+ }
43
54
  }
@@ -84,7 +84,6 @@
84
84
  .bg-main { background-color: var(--color-bg); }
85
85
  .bg-black { background-color: var(--color-text); }
86
86
  .bg-white { background-color: var(--color-text-reversed); }
87
- .bg-shade { background-color: var(--color-border-light); }
88
87
  .bg-transparent { background-color: transparent; }
89
88
 
90
89
  /****************************************************************
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CssZero
4
- VERSION = "0.0.9"
4
+ VERSION = "0.0.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lázaro Nixon
@@ -20,7 +20,6 @@ files:
20
20
  - Rakefile
21
21
  - app/assets/stylesheets/_reset.css
22
22
  - app/assets/stylesheets/animations.css
23
- - app/assets/stylesheets/base.css
24
23
  - app/assets/stylesheets/borders.css
25
24
  - app/assets/stylesheets/buttons.css
26
25
  - app/assets/stylesheets/colors.css
@@ -29,7 +28,6 @@ files:
29
28
  - app/assets/stylesheets/filters.css
30
29
  - app/assets/stylesheets/grid.css
31
30
  - app/assets/stylesheets/inputs.css
32
- - app/assets/stylesheets/separators.css
33
31
  - app/assets/stylesheets/sizes.css
34
32
  - app/assets/stylesheets/transform.css
35
33
  - app/assets/stylesheets/transition.css
@@ -1,4 +0,0 @@
1
- html, body {
2
- background-color: var(--color-bg);
3
- color: var(--color-text);
4
- }
@@ -1,4 +0,0 @@
1
- .separator {
2
- border-block-start: 1px var(--separator-style, solid) var(--separator-color, var(--color-border));
3
- inline-size: 100%;
4
- }