clairity.css 0.1.0 → 0.1.2
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 +4 -4
- data/CHANGELOG.md +66 -2
- data/README.md +8 -4
- data/lib/assets/css/clairity/classes.css +9 -2
- data/lib/assets/css/clairity/components.css +6 -2
- data/lib/assets/css/clairity/cosmetic.css +2 -1
- data/lib/assets/css/clairity/palette.css +21 -2
- data/lib/assets/css/clairity/variables.css +4 -4
- data/lib/clairity.css/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: 7fc66e74a6d2155fe9f589d0b4b32ab365b6ac466c9319c8ddda90528d11e8c1
|
4
|
+
data.tar.gz: ef0b2fad496abd68562f0fa8cc45e25e003aba4e375b784f33cfab29bd22bbe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54dc10253e7948c79ad1ae98e41bdac13c5ce2d11debb74228f340be56cb00df640c481e0ac0e326b7c398de8015a306781f2fdb7f98436f9645f3e2a84e3b42
|
7
|
+
data.tar.gz: b7b019ee3a275e1514edec06ac4ddff518dc644cb599c8b17abd507d01968aead9740aad7e21bd1b5f7ac6a9591f5e413d9d707674ff72fc2f1f91dd35580718
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,8 @@ Expect pre-v1.0 releases to have many backwards incompatible changes, being prim
|
|
9
9
|
|
10
10
|
This section is for recording changes committed since the last release.
|
11
11
|
|
12
|
+
### General
|
13
|
+
|
12
14
|
|
13
15
|
### `clairity.basic.css`
|
14
16
|
|
@@ -50,12 +52,75 @@ This section is for recording changes committed since the last release.
|
|
50
52
|
|
51
53
|
|
52
54
|
|
55
|
+
## v0.1.2 - 2023-04-21
|
56
|
+
|
57
|
+
The big change here is fixing the color palette, which was left in an inconsistent state after attempting to use css relative color syntax, which is very much not ready for prime time. We also still need to fix accent coloring for differentiated text (e.g., `<code>`, `<var>`, `<pre>`, `<xmp>`, `<kbd>`) when using okLCH rather than HSL (TODO).
|
58
|
+
|
59
|
+
Our experiment using the perceptually-uniform (but not volumetrically-uniform) okLCH color space to generate a palette programmatically has failed for the general case, as noted in our v0.0.3 release notes below (aka, the dark yellow problem). We'll need to decide whether to keep those artifacts around, move them into an optional css file, or remove them entirely.
|
60
|
+
|
61
|
+
|
62
|
+
### General
|
63
|
+
|
64
|
+
* TEMP: duplicate `assets` from `lib` into `docs` directory to render sample pages correctly; longer-term, need to find a better solution than duplicating files.
|
65
|
+
* add `ruby` and `x86_64-linux` as platforms in `Gemfile.lock` via `bundle lock --add-platform ruby` and `bundle lock --add-platform x86_64-linux` to get github actions to stop failing the build job
|
66
|
+
* add files from `public` to `docs` so they show up on the [<samp class="clairity">clairity.css</samp> home page](https://css.clairity.blog)
|
67
|
+
* add spec page stylesheet (`clairity.html.css`) to show a full sample color palette in both hsl and oklch color spaces (most, if not all, sites will not have 9 brand colors, so we don't define all of these in the framework itself)
|
68
|
+
|
69
|
+
|
70
|
+
### `variables.css`
|
71
|
+
|
72
|
+
Note that `variables.css` defines logical/semantic colors to be used in sites/apps while `palette.css` defines the color palette to which logical colors are mapped, decoupling semantic meaning from the underlying color definition (we dove headlong into the naming things problem).
|
73
|
+
|
74
|
+
* fix the `--contrast` color
|
75
|
+
* increase default contrast of the default (light mode) `--constrast` color
|
76
|
+
* for dark mode, use `--translucent` for the `--contrast` color, so as to cast a tint onto the background color, rather than changing the color (for slight contrast)
|
77
|
+
* for dark mode, lighten the `--link` color a bit
|
78
|
+
|
79
|
+
|
80
|
+
### `palette.css`
|
81
|
+
|
82
|
+
|
83
|
+
* add `--a2` to alpha transparency scale (not sure if we need a full scale here or not)
|
84
|
+
* add `--l25` to the okLCH lightness scale (TODO: use a single lightness scale for both HSL & okLCH)
|
85
|
+
* add okLCH version of the `--primary` color scale (this fixes most of the mismatched/missing color problems when using okLCH)
|
86
|
+
|
87
|
+
|
88
|
+
### `cosmetic.css`
|
89
|
+
|
90
|
+
* links in headings shouldn't be differentiated by color, to reduce visual distraction
|
91
|
+
* set the `--heading` color explicitly on heading elements (an equivalent from for heading classes is set in `classes.css` to avoid violating our no classes rule for `cosmetic.css`)
|
92
|
+
* add the `:visited` state (which only applies to `<a>` and `<area>` elements that have an `href`) to the elements this rule applies to
|
93
|
+
|
94
|
+
|
95
|
+
### `classes.css`
|
96
|
+
|
97
|
+
* restore `width` and `margin-inline` on `100dvi` class to address the horizontal scrollbar issue (works in some cases, but not all)
|
98
|
+
* as in `cosmetic.css` with heading elements, set the `--heading` color explicitly on unvisited and `:visited` links in heading classes
|
99
|
+
|
100
|
+
|
101
|
+
### `components.css`
|
102
|
+
|
103
|
+
* explicitly set `z-index` to `0` (creating a stacking context) on a `.banner` `.content` block, as safari uses source order otherwise, as a `.banner` hero image has a z-index of `-1` (and otherwise sits on top of `.content` if it comes before the image in the source)
|
104
|
+
* remove the superfluous `a` designation on `:visited` in the rule to color `[aria-label="primary"]` and `nav menu li` links with the `--link` color, as it unnecessarily increases specificity and `:visited` only applies to `<a>` and `<area>` elements with an `href` anyway
|
105
|
+
|
106
|
+
|
107
|
+
## v0.1.1 - 2023-04-19
|
108
|
+
|
109
|
+
* github added `docs` directory with a `CNAME` file to deploy to github pages (the gemspec doesn't need this file, since it's for github only)
|
110
|
+
* added sample `index.html` to docs directory to see it in action
|
111
|
+
|
53
112
|
|
54
113
|
## v0.1.0 - 2023-04-19
|
55
114
|
|
56
115
|
These changes bring <samp class="clairity">clairity.css</samp> to present day, hence the bump to v0.1.0 rather than v0.0.4. This is also the first version to release on rubygems.
|
57
116
|
|
58
117
|
|
118
|
+
### General
|
119
|
+
* `README.md` release checklist
|
120
|
+
* update with correct `git` command to push commits with (annotated) tags
|
121
|
+
* note that `Gemfile.lock` might change, so `bundle` it again if need be
|
122
|
+
|
123
|
+
|
59
124
|
### `variables.css`
|
60
125
|
|
61
126
|
* tweak the `--small` font size from `0.9rem` to `0.875rem` for more differentiation with `--medium`
|
@@ -101,7 +166,7 @@ Cosmetic adjustments typically tweak base styles for specific situations.
|
|
101
166
|
|
102
167
|
### `classes.css`
|
103
168
|
|
104
|
-
*
|
169
|
+
* temporarily remove `width` and `margin-inline` on `100dvi` class to address the horizontal scrollbar issue
|
105
170
|
* add semantic state color classes `.valid`, `.invalid`, and `.unknown`
|
106
171
|
* add `.i-home-edit`, `.i-mail-check`, `.i-mail-x`, `.i-send`, `.i-server-cog`, `.i-user-circle`, `.i-user-off` icon classes
|
107
172
|
* add `.unadorned` class to remove `::before` and `::after` content, which is useful for adding a custom icon to an element that already has a default icon
|
@@ -146,7 +211,6 @@ The changes encompassed by this release were largely completed by about October
|
|
146
211
|
|
147
212
|
### General
|
148
213
|
|
149
|
-
- in `README.md`, updated the release checklist with correct `git` command to push commits with (annotated) tags
|
150
214
|
- added `icons.css` - a minimal set of svg icons exposed as CSS variables
|
151
215
|
- emulating the nice developer ergonomics of icon fonts, we overhauled icons entirely so that we can
|
152
216
|
- use css variables to define svg icons (rather than being inline defined)
|
data/README.md
CHANGED
@@ -138,18 +138,22 @@ To release a new version (for gem owners), follow the release checklist in the n
|
|
138
138
|
To release this gem, follow these steps:
|
139
139
|
|
140
140
|
0. make sure the git user/email, git credentials, and rubygems `~/.gem/credentials` are all set correctly to be able to push to github and rubygems (only gem owners can push to rubygems).
|
141
|
+
1. make sure gems in the bundle are up-to-date (`bundle outdated` and `bundle update`) for minor version bumps (should test major bumps first)
|
141
142
|
1. run the test suite via `rake test` and fix any issues
|
142
143
|
1. update the docs (haha, are there any docs yet?)
|
144
|
+
1. copy `assets` directory (or just changed css files as the case may be) from `lib` to `docs` (our symlink trick doesn't work on github, so we really need to automate this)
|
143
145
|
1. make sure the `CHANGELOG.md` is up to date with a summary of the changes since the last release
|
144
146
|
1. choose a version number `X.Y.Z` for the new release based on the magnitude of the changes and in accordance with semantic versioning (replace `X.Y.Z` with the actual version number here, and below, obviously)
|
145
147
|
1. update the version number `X.Y.Z` in `lib/clairity.css/version.rb`
|
146
|
-
1.
|
147
|
-
1.
|
148
|
+
1. `Gemfile.lock` likely needs to be updated due to the version number change, so update it via `bundle && git add Gemfile.lock`
|
149
|
+
1. update the `s.files` array in `clairity.css.gemspec` with any new files outside the main gem directories (such as `lib`) that need to be *packaged in the gem itself*
|
150
|
+
1. build the gem with `gem build clairity.css.gemspec` (likely in the project root directory, but that's ok for now)
|
148
151
|
1. (optional) confirm the gem contents by unpacking it with `gem unpack clairity.css-X.Y.Z.gem` in the `pkg` directory (and delete the resultant `clairity.css-X.Y.Z` folder when finished)
|
149
|
-
1. `git commit -m "with a descriptive commit message here"`
|
152
|
+
1. `git commit -m "with a descriptive commit message here"` (or using our standard shortcut, `git cm "message"`)
|
150
153
|
1. tag the newly-created commit with an annotated tag `git tag vX.Y.Z -am "summary of the tag"` (calling `git tag` without a commit hash tags the last commit)
|
151
154
|
1. push the commit *with annotated tags* to github: `git push --follow-tags` (check that git remote points to `origin` at `clairity/clairity.css` with `git remote -v`)
|
152
|
-
1. push the gem to rubygems: `gem push clairity.css-X.Y.Z.gem`
|
155
|
+
1. push the gem (sitting in the project root directory) to rubygems: `gem push clairity.css-X.Y.Z.gem`
|
156
|
+
1. manually (as it doesn't do it automatically, despite what the docs say) move the gem package to the `pkg` directory: `mv clairity.css-X.Y.Z.gem pkg`
|
153
157
|
|
154
158
|
|
155
159
|
### Contributing
|
@@ -43,9 +43,9 @@ body > *:not(.fluid) {
|
|
43
43
|
|
44
44
|
/* #100dvi - dynamic full width of the viewport */
|
45
45
|
._100dvi, [class~="100dvi"] {
|
46
|
-
|
46
|
+
width: 100dvi;
|
47
47
|
max-width: 100dvi; /* still has horizontal scrollbar issues */
|
48
|
-
|
48
|
+
margin-inline: calc(50% - 50dvi - var(--xs));/*neg margin if needed*/
|
49
49
|
}
|
50
50
|
|
51
51
|
|
@@ -101,6 +101,13 @@ body > *:not(.fluid) {
|
|
101
101
|
.h6 { --min-font: 1; --max-font: 1.125; }
|
102
102
|
.h5, .h6 { font-weight: var(--bold); }
|
103
103
|
|
104
|
+
/* dampen the prominence of links in headings; keep in sync with cosmetic.css */
|
105
|
+
:where(.h1, .h2, .h3, .h4, .h5, .h6) :is(a, :visited) {
|
106
|
+
color: var(--heading);
|
107
|
+
font-weight: unset;
|
108
|
+
text-decoration-style: dotted;
|
109
|
+
}
|
110
|
+
|
104
111
|
/* text providing extra detail to a heading. p-subtitle is a microformat
|
105
112
|
(plaintext) alternative class name for .subtitle
|
106
113
|
// .......................................................................... */
|
@@ -154,6 +154,7 @@ i[class^='i-'] {
|
|
154
154
|
|
155
155
|
/* -----------------------------------------------------------------------------
|
156
156
|
// #banner - header that usually includes a hero image and perhaps a nav
|
157
|
+
// uses the grid `place-items: center` technique on all children
|
157
158
|
// -------------------------------------------------------------------------- */
|
158
159
|
|
159
160
|
.banner {
|
@@ -176,7 +177,10 @@ i[class^='i-'] {
|
|
176
177
|
/*.banner menu { margin-block: var(--ml); }*/
|
177
178
|
|
178
179
|
/* banner #content - constrain content width with a css variable set on parent*/
|
179
|
-
.banner .content {
|
180
|
+
.banner .content {
|
181
|
+
width: var(--content-width);
|
182
|
+
z-index: 0; /* safari uses source order otherwise */
|
183
|
+
}
|
180
184
|
|
181
185
|
/* banner grid */
|
182
186
|
.banner > * { grid-area: banner; }
|
@@ -295,7 +299,7 @@ body > nav a, body > header > nav a {
|
|
295
299
|
max-height: 2.75rem;
|
296
300
|
}
|
297
301
|
/* visited links in the nav menu shouldn't be different colors */
|
298
|
-
:where([aria-label="primary"], nav menu li)
|
302
|
+
:where([aria-label="primary"], nav menu li) :visited { color: var(--link); }
|
299
303
|
|
300
304
|
/*body > nav a.button, body > header > nav a.button {
|
301
305
|
white-space: nowrap;
|
@@ -46,7 +46,8 @@ nav > menu > li { display: inline; } /* only direct children, as menu
|
|
46
46
|
}
|
47
47
|
|
48
48
|
/* dampen the prominence of links in headings */
|
49
|
-
:where(h1, h2, h3, h4, h5, h6) a {
|
49
|
+
:where(h1, h2, h3, h4, h5, h6) :is(a, :visited) {
|
50
|
+
color: var(--heading);
|
50
51
|
font-weight: unset;
|
51
52
|
text-decoration-style: dotted;
|
52
53
|
}
|
@@ -10,8 +10,9 @@
|
|
10
10
|
:root {
|
11
11
|
/* Palette Hues - define HSL (eventually okLCH) hues in the following broad
|
12
12
|
categorical color names that will be used for primary, secondary, & accent
|
13
|
-
colors. Not all need to be defined or used.
|
14
|
-
are
|
13
|
+
colors. Not all need to be defined or used. range: [0, 360]
|
14
|
+
okLCH versions of these hues are defined behind an @supports rule below. */
|
15
|
+
|
15
16
|
--red: 4; /* dark red / error color / secondary */
|
16
17
|
--brown: 20;
|
17
18
|
--orange: 30;
|
@@ -65,6 +66,7 @@
|
|
65
66
|
/* Alpha transparency values - range: [0, 1] or [0%, 100%] */
|
66
67
|
--a0: 0.05; /* more transparent */
|
67
68
|
--a1: 0.1; /* default for nearly transparent bg's */
|
69
|
+
--a2: 0.2;
|
68
70
|
|
69
71
|
|
70
72
|
/* Named flash/form message colors - highlights are more extreme & lowlights
|
@@ -233,6 +235,7 @@
|
|
233
235
|
--l10: 96%;
|
234
236
|
--l15: 92%; /* brighten */
|
235
237
|
--l20: 90%;
|
238
|
+
--l25: 85%;
|
236
239
|
--l30: 80%;
|
237
240
|
--l40: 70%;
|
238
241
|
--l45: 67%; /* lighten */
|
@@ -267,6 +270,22 @@
|
|
267
270
|
--tetradic: oklch(var(--l50) var(--c7) var(--tetrad) );
|
268
271
|
--cotetradic: oklch(var(--l50) var(--c7) var(--cotetrad) );
|
269
272
|
|
273
|
+
--primary-100: oklch(var(--l20) var(--c2) var(--1st));
|
274
|
+
--primary-200: oklch(var(--l25) var(--c4) var(--1st));
|
275
|
+
--primary-300: oklch(var(--l40) var(--c4) var(--1st));
|
276
|
+
--primary-400: oklch(var(--l50) var(--c4) var(--1st));
|
277
|
+
--primary-500: oklch(var(--l55) var(--c4) var(--1st));
|
278
|
+
--primary-600: oklch(var(--l65) var(--c4) var(--1st));
|
279
|
+
--primary-700: oklch(var(--l70) var(--c4) var(--1st));
|
280
|
+
--primary-800: oklch(var(--l80) var(--c4) var(--1st));
|
281
|
+
--primary-900: oklch(var(--l90) var(--c4) var(--1st));
|
282
|
+
--primary-bright: oklch(var(--l55) var(--c6) var(--1st));
|
283
|
+
--primary-transparent: oklch(var(--l60) var(--c6) var(--1st) / var(--a2));
|
284
|
+
|
285
|
+
/* CSS Color Level 5 Relative Color Syntax not supported in firefox yet,
|
286
|
+
see: https://bugzilla.mozilla.org/show_bug.cgi?id=1701488 */
|
287
|
+
/*--primary-transparent: oklch(from var(--primary) l var(--c6) h / var(--a1));*/
|
288
|
+
|
270
289
|
|
271
290
|
/* Named flash/form message colors - highlights are more extreme & lowlights
|
272
291
|
less extreme versions of the base color, relative to the color scheme */
|
@@ -166,7 +166,7 @@
|
|
166
166
|
|
167
167
|
/* transparencies - fallback to grayscale if primary is not set */
|
168
168
|
--pale: var(--primary-200, hsl(210, 0%, 45%, 0.2) );
|
169
|
-
--translucent: var(--primary-transparent,hsl(210, 0%, 45%, 0.1));
|
169
|
+
--translucent: var(--primary-transparent, hsl(210, 0%, 45%, 0.1));
|
170
170
|
--transparent: hsl(0, 0%, 45%, 0.05);
|
171
171
|
|
172
172
|
/* Absolute text colors - doesn't change with color scheme */
|
@@ -210,7 +210,7 @@
|
|
210
210
|
--checked: var(--foreground); /* checked / selected */
|
211
211
|
--unchecked: var(--bg-field); /* to ensure consistency */
|
212
212
|
--deactivated: var(--300, ButtonFace); /* selected but unfocused */
|
213
|
-
--contrast: var(--primary-
|
213
|
+
--contrast: var(--primary-100, azure); /* slight contrast */
|
214
214
|
|
215
215
|
/* Logical background colors - prefixed with bg- to show strong relationship
|
216
216
|
with corresponding text color (i.e., they're meant to be used together) */
|
@@ -264,13 +264,13 @@
|
|
264
264
|
--inactive: var(--600, ButtonText);
|
265
265
|
--mark: var(--100, CanvasText); /* MarkText is unsupported */
|
266
266
|
/* Logical link colors - features our primary color because it's blue */
|
267
|
-
--link: var(--primary-
|
267
|
+
--link: var(--primary-400, dodgerblue); /* LinkText is too
|
268
268
|
dark on chrome/safari */
|
269
269
|
--visited: var(--primary-600, mediumorchid);
|
270
270
|
--active: var(--primary-400, ActiveText);
|
271
271
|
--action: ButtonText;
|
272
272
|
/* Logical foreground colors */
|
273
|
-
--contrast: var(--
|
273
|
+
--contrast: var(--translucent, GrayText); /* for inverted
|
274
274
|
hover/zebra */
|
275
275
|
--deactivated: var(--700); /* disabled, selected checks/radios */
|
276
276
|
/* Logical background colors */
|
data/lib/clairity.css/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clairity.css
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- clairity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|