css-zero 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -12
- data/app/assets/stylesheets/colors.css +22 -0
- data/app/assets/stylesheets/sizes.css +14 -13
- data/app/assets/stylesheets/zutilities.css +30 -9
- data/lib/css_zero/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4b91f7cfe11150ba5eea2a4d3cffa4097f5a2cfb746d7dbb58e44c8ed344b05
|
4
|
+
data.tar.gz: f8702fe3a28fc2b93714b310e449eb0e54d2bf4b90815abdd7a9a5b1b3a19eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70980bc8b30c9c76babd5d37b3802cb9f2fd8f5c0dfef67fc67aa519050c8253431210a76ed153f4e82b3c14bb61715ecf0043254593320000d9a8c5247b95b0
|
7
|
+
data.tar.gz: 98fa14f8b800ca3daf3411834249372646b18d3a41bb5dd0d84204de983a192376c195163a2e4b16aa71873c027a5d387ae9258f3b39a97d51b0236b6c0fa6ff
|
data/README.md
CHANGED
@@ -12,25 +12,25 @@ This gem requires [propshaft](https://github.com/rails/propshaft) as the asset p
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
+
```html
|
16
|
+
<h1 class="text-xl font-bold mb-md">
|
17
|
+
Write most page content using utility classes. Use what is available or add more when needed.
|
18
|
+
</h1>
|
19
|
+
|
20
|
+
<div class="component">
|
21
|
+
Write custom CSS using predefined variables for more complex stuff.
|
22
|
+
</div>
|
23
|
+
```
|
24
|
+
|
15
25
|
```css
|
16
26
|
.component {
|
17
|
-
background-color: var(--red-500);
|
27
|
+
background-color: var(--red-500);
|
18
28
|
border-radius: var(--rounded);
|
19
29
|
height: var(--size-4);
|
20
|
-
|
21
|
-
@media (min-width: 48rem) {
|
22
|
-
display: none;
|
23
|
-
}
|
24
30
|
}
|
25
31
|
```
|
26
32
|
|
27
|
-
|
28
|
-
<div class="component mbe-md">
|
29
|
-
<p>content here...</p>
|
30
|
-
</div>
|
31
|
-
```
|
32
|
-
|
33
|
-
## Files
|
33
|
+
## Reference
|
34
34
|
|
35
35
|
- [Sizes](app/assets/stylesheets/sizes.css)
|
36
36
|
- [Colors](app/assets/stylesheets/colors.css)
|
@@ -44,6 +44,27 @@ This gem requires [propshaft](https://github.com/rails/propshaft) as the asset p
|
|
44
44
|
- [Animations](app/assets/stylesheets/animations.css)
|
45
45
|
- [Utilities](app/assets/stylesheets/zutilities.css)
|
46
46
|
|
47
|
+
## Customization
|
48
|
+
|
49
|
+
```css
|
50
|
+
:root {
|
51
|
+
--color-negative: var(--pink-700);
|
52
|
+
--color-postive: var(--lime-700);
|
53
|
+
--color-bg: white;
|
54
|
+
--color-bg-surface: var(--zinc-100);
|
55
|
+
--color-text: var(--zinc-950);
|
56
|
+
--color-text-reversed: white;
|
57
|
+
--color-text-subtle: var(--zinc-600);
|
58
|
+
--color-border: var(--zinc-200);
|
59
|
+
}
|
60
|
+
```
|
61
|
+
|
62
|
+
```html
|
63
|
+
<div class="flex flex-column w-full gap" style="--row-gap: 0.5rem">
|
64
|
+
More HTML tags here...
|
65
|
+
</div>
|
66
|
+
```
|
67
|
+
|
47
68
|
## Development
|
48
69
|
|
49
70
|
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
@@ -1,4 +1,5 @@
|
|
1
1
|
:root {
|
2
|
+
/* Named color values */
|
2
3
|
--slate-50: #f8fafc;
|
3
4
|
--slate-100: #f1f5f9;
|
4
5
|
--slate-200: #e2e8f0;
|
@@ -262,4 +263,25 @@
|
|
262
263
|
--rose-800: #9f1239;
|
263
264
|
--rose-900: #881337;
|
264
265
|
--rose-950: #4c0519;
|
266
|
+
|
267
|
+
/* Abstractions */
|
268
|
+
--color-negative: var(--pink-700);
|
269
|
+
--color-postive: var(--lime-700);
|
270
|
+
--color-bg: white;
|
271
|
+
--color-bg-surface: var(--zinc-100);
|
272
|
+
--color-text: var(--zinc-950);
|
273
|
+
--color-text-reversed: white;
|
274
|
+
--color-text-subtle: var(--zinc-600);
|
275
|
+
--color-border: var(--zinc-200);
|
276
|
+
|
277
|
+
/* Redefine named color values for dark mode */
|
278
|
+
@media (prefers-color-scheme: dark) {
|
279
|
+
--color-negative: var(--pink-400);
|
280
|
+
--color-postive: var(--lime-300);
|
281
|
+
--color-bg: var(--zinc-900);
|
282
|
+
--color-bg-surface: var(--zinc-950);
|
283
|
+
--color-text: white;
|
284
|
+
--color-text-reversed: var(--zinc-950);
|
285
|
+
--color-border: rgba(255, 255, 255, 0.1);
|
286
|
+
}
|
265
287
|
}
|
@@ -70,19 +70,20 @@
|
|
70
70
|
/****************************************************************
|
71
71
|
* Widths
|
72
72
|
*****************************************************************/
|
73
|
-
--width-3xs:
|
74
|
-
--width-2xs:
|
75
|
-
--width-xs:
|
76
|
-
--width-sm:
|
77
|
-
--width-md:
|
78
|
-
--width-lg:
|
79
|
-
--width-xl:
|
80
|
-
--width-2xl:
|
81
|
-
--width-3xl:
|
82
|
-
--width-4xl:
|
83
|
-
--width-5xl:
|
84
|
-
--width-6xl:
|
85
|
-
--width-7xl:
|
73
|
+
--width-3xs: 16rem; /* 256px */
|
74
|
+
--width-2xs: 18rem; /* 288px */
|
75
|
+
--width-xs: 20rem; /* 320px */
|
76
|
+
--width-sm: 24rem; /* 384px */
|
77
|
+
--width-md: 28rem; /* 448px */
|
78
|
+
--width-lg: 32rem; /* 512px */
|
79
|
+
--width-xl: 36rem; /* 576px */
|
80
|
+
--width-2xl: 42rem; /* 672px */
|
81
|
+
--width-3xl: 48rem; /* 768px */
|
82
|
+
--width-4xl: 56rem; /* 896px */
|
83
|
+
--width-5xl: 64rem; /* 1024px */
|
84
|
+
--width-6xl: 72rem; /* 1152px */
|
85
|
+
--width-7xl: 80rem; /* 1280px */
|
86
|
+
--width-prose: 65ch;
|
86
87
|
|
87
88
|
/****************************************************************
|
88
89
|
* Breakpoints
|
@@ -47,7 +47,7 @@
|
|
47
47
|
/****************************************************************
|
48
48
|
* Text
|
49
49
|
*****************************************************************/
|
50
|
-
.font-normal { font-weight: var(--font-normal); }
|
50
|
+
.font-normal { font-weight: var(--font-normal); font-style: normal; }
|
51
51
|
.font-medium { font-weight: var(--font-medium); }
|
52
52
|
.font-bold { font-weight: var(--font-bold); }
|
53
53
|
|
@@ -71,7 +71,11 @@
|
|
71
71
|
.leading-tight { line-height: var(--leading-tight); }
|
72
72
|
.leading-normal { line-height: var(--leading-normal); }
|
73
73
|
|
74
|
-
.text-
|
74
|
+
.text-primary { color: var(--color-text); }
|
75
|
+
.text-reversed { color: var(--color-text-reversed); }
|
76
|
+
.text-subtle { color: var(--color-text-subtle); }
|
77
|
+
.text-negative { color: var(--color-negative); }
|
78
|
+
.text-positive { color: var(--color-positive); }
|
75
79
|
|
76
80
|
.text-xs { font-size: var(--text-xs); }
|
77
81
|
.text-sm { font-size: var(--text-sm); }
|
@@ -83,16 +87,33 @@
|
|
83
87
|
.text-4xl { font-size: var(--text-4xl); }
|
84
88
|
.text-5xl { font-size: var(--text-5xl); }
|
85
89
|
|
90
|
+
/****************************************************************
|
91
|
+
* Background
|
92
|
+
*****************************************************************/
|
93
|
+
.bg-main { background-color: var(--color-bg); }
|
94
|
+
.bg-white { background-color: var(--color-text-reversed); }
|
95
|
+
.bg-surface { background-color: var(--color-bg-surface); }
|
96
|
+
.bg-transparent { background-color: transparent; }
|
97
|
+
|
86
98
|
/****************************************************************
|
87
99
|
* Border
|
88
100
|
*****************************************************************/
|
89
|
-
.border-0 { border
|
90
|
-
.border
|
91
|
-
.border-
|
92
|
-
.border-
|
93
|
-
.border-
|
94
|
-
.border { border-
|
95
|
-
|
101
|
+
.border-0 { border: 0; }
|
102
|
+
.border { border: var(--border-size, 1px) solid var(--color-border); }
|
103
|
+
.border-t { border-top: var(--border-size, 1px) solid var(--color-border); }
|
104
|
+
.border-b { border-bottom: var(--border-size, 1px) solid var(--color-border); }
|
105
|
+
.border-l { border-left: var(--border-size, 1px) solid var(--color-border); }
|
106
|
+
.border-r { border-right: var(--border-size, 1px) solid var(--color-border); }
|
107
|
+
|
108
|
+
.border-radius { border-radius: var(--border-radius, 0.5rem); }
|
109
|
+
|
110
|
+
/****************************************************************
|
111
|
+
* Shadow
|
112
|
+
*****************************************************************/
|
113
|
+
.shadow { box-shadow: var(--shadow); }
|
114
|
+
.shadow-md { box-shadow: var(--shadow-md); }
|
115
|
+
.shadow-lg { box-shadow: var(--shadow-lg); }
|
116
|
+
.shadow-xl { box-shadow: var(--shadow-xl); }
|
96
117
|
|
97
118
|
/****************************************************************
|
98
119
|
* Layout
|
data/lib/css_zero/version.rb
CHANGED
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.3
|
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-06-
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|