clairity.css 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '03182618c372285ec43b03d258e897e30bd664e63c7a6fb1233ee03bd17d2b4c'
4
- data.tar.gz: 040110db6d633bbef9bf3d7afc77f6dd72e808e26ecb251bbe39f57645aac97f
3
+ metadata.gz: 163be46874756a5231e475c95d45a25d38a8a885a37e310db7241f6a3e263afe
4
+ data.tar.gz: a96f76cc8e47c0db378013e9c53e2fdbbb616a27d65bab50318eaba640b4e677
5
5
  SHA512:
6
- metadata.gz: 04f1f1637aad3a420dba9a51e226484001f117f404d19f353c90729dde1058c6a73fb4120bd07dbfe2316294a42c60d8c524ce4f4236e1ac8383a79e0504f84a
7
- data.tar.gz: 8ac5c4c0462ac43df99c4312e6856b6a73e13973b504c9ad5ade8ed656c563d21dfa2a32ef65ce96e295d9d100a5bc18994b157d90256cd8eba2f56bd0eaf47c
6
+ metadata.gz: 10c2542beddd54bdb64cb7a7814a8ed7759c219ed3fc20805793f178918a6b22e29a29a4c18742304a23b8e96c5ea4f57d28cc4fb260fe9c857884bfe9ca56a4
7
+ data.tar.gz: '073693dbf6e84957586a0bc2f05a562f4d3cc5ae9a6d1a0a6906565c93c2d9e8e35afbf35d2fd2f6c25e21577d0bcf3170a79956b785eae2a0d1d07a1cbe4c3c'
data/CHANGELOG.md CHANGED
@@ -4,75 +4,296 @@ The early parts of this changelog are going to be a little ambiguous and incompl
4
4
 
5
5
  Expect pre-v1.0 releases to have many backwards incompatible changes, being primarily meant for testing and feedback as we experiment with different approaches to common challenges leading up to a production-ready release.
6
6
 
7
+ Going forward, this changelog will use the [keep a changelog](https://keepachangelog.com/) format and version according to [semantic versioning](https://semver.org/).
8
+
7
9
 
8
10
  ## [Unreleased]
9
11
 
10
12
  This section is for recording changes committed since the last release.
11
13
 
14
+ ### Added
15
+
16
+
17
+ ### Changed
18
+
19
+
20
+ ### Deprecated
21
+
22
+
23
+ ### Removed
24
+
25
+
26
+ ### Fixed
27
+
28
+
29
+ ### Security
30
+
31
+
32
+
33
+ ## [v0.2.0] - 20230504
34
+
35
+ This release focused on three distinct improvements:
36
+
37
+ 1. fixing/updating `palette.css` so that HSL and okLCH palette sets are harmonious and complete
38
+ 1. fixing full-bleed layouts for hero headers and fat footers
39
+ 1. adding documentation pages (all still very much works-in-progress) to flesh out both the content and structure of our fledgling documentation set
40
+
41
+ One note related to the palette: okLCH officially lands in Firefox next week with [version 113](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/113) (the last major browser engine to do so), so we'll deprecate the HSL palette set in a year or so, and move on to primarily using okLCH then.
42
+
43
+
44
+ ### Added
45
+
46
+
47
+ #### [clairity.css]
48
+
49
+ * now importing `shims.css` in `clairity.css` by default (previously commented out) to be able to start moving css that is specifically meant to support non-semantic but common ("legacy") markup styles (like adding `<div>` tags around form inputs) there
50
+ * added `legacy.css` for supporting legacy (prior to ~2020) browsers (as opposed to "legacy" markup, which is what `shims.css` adresses)
51
+ * added future `print.css` `@import` line, as a TODO marker
52
+
53
+ #### [palette.css]
54
+
55
+ * better described the structure of `palette.css` in the opening comments
56
+ * expanded the saturation scale (HSL only)
57
+ * explicitly define the primary (9 colors) & complementary (5 colors) color sets for both HSL & okLCH
58
+ * provide full color scales for `--primary`, `--complementary`, `--secondary`, and `--neutral` colors for both HSL & okLCH
59
+ * provide semantic color sets for both HSL & okLCH
60
+ * messaging colors: `--info`, `--success`, `--warning`, `--error`
61
+ * state colors: `--valid`, `--invalid`, `--unknown`
62
+
63
+
64
+ #### [base.css]
65
+
66
+ * noted that a `<meta charset="utf-8">` declaration is needed to get certain non-Latin glyphs (like open-quote in blockquotes) to render correctly
67
+ * added `form` as an element that gets a default `container-name` applied for `inline-size` containment/container queries
68
+
69
+ #### [cosmetic.css]
70
+
71
+ * make bare divs in the default body grid exclude the outermost columns (aka be "padded") by default
72
+ * add a default `--l` (large) top margin to the site footer &mdash; that is, `footer:last-of-type` within the `<body>` element, which is not a perfect proxy for the site footer as it presumes a given html structure, but as close as we can get for now
73
+ * rather than being confined to the `elements` grid column, let fieldsets span the `full` grid of a parent form container on narrower width viewports (`<= 35rem`), and give the legend a slightly de-emphasized treatment as well
74
+
75
+
76
+ #### [states.css]
77
+ * in accordance with other read-only input types, remove borders for `<input>` that don't have a `type` attribute if `:read-only` and `:enabled`
78
+
79
+ #### [components.css]
80
+
81
+ * added `HACK` to better contain `<footer>` elements that have the `.100dvi` class applied to them to create a full-bleed (fat) footer
82
+ * added container query to add `--s` (small) `padding-inline` to non-`.hero`/`<img>` `.banner` elements at container sizes `<= 50rem` (800px @ 16px/rem), because there would be no inline padding/margin otherwise and content would abut the viewport edges
83
+ * added a `max-width` to `search` inputs of `100cqi` (100% of container width) to keep it from breaking out of the containing form (this helps the `.button_to` mini-form component in particular)
84
+ * added `.tag` class to `.tags > li` rule styling tags (this should probably be a separate rule in `classes.css` and kept in sync with `.tags > li` until css mixins become a reality, if ever)
85
+
86
+ #### [utilities.css]
87
+
88
+ * added a general `prefers-reduced-motion` rule [as recommended](https://css-tricks.com/a-complete-guide-to-css-media-queries/#aa-accessibility)
89
+
90
+
91
+ #### Documentation
92
+
93
+ * added `classes.html`, `components.html`, `grid.html`, and `palette.html` doc pages (still works in progress)
94
+ * added `dropin.html` and `cssbed.html` sample pages, to showcase shimming for alternate html structures
95
+ * added `site.webmanifest` to `docs` and `public` folders, mainly for [declaring favicons portably](https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs)
96
+ * added a version of the Navier-Stokes equation (which describes fluid flows) to docs as another slightly more complicated example of MathML
97
+
98
+
99
+ ### Changed
100
+
12
101
 
13
- ### `clairity.basic.css`
102
+ #### [palette.css]
14
103
 
104
+ * consolidated lightness scale for HSL & okLCH (using percentages)
105
+ *
15
106
 
16
- ### `clairity.classless.css`
107
+ #### [cosmetic.css]
17
108
 
109
+ * moved numerous non-state related css rules here from cosmetic.css
110
+ * icons for specialized links
111
+ * scroll-margin for elements with an `id` property
112
+ * removing vertical gaps between consecutive unordered/ordered lists
113
+ * sticky table styles for `<thead>`, `<tbody>`, and `<tfoot>`
114
+ * zebra striping for table rows
115
+ * unstyling unordered lists in forms (because they typically list out form controls like checkboxes/radio buttons rather than text)
116
+ * implementing the default form grid on `<fieldset>` elements
117
+ * extending grids into container subelements, `<section>`, `<p>`, and `<div>` (using `<p>` this way is un-semantic, but not uncommon), and fix the placement of checkboxes/radio buttons and their labels
118
+ * aligning labels to top for `<textarea>` and multiple `<select>` elements, which are typically multi-line in height
119
+ * respecting an `<input>` element's `size` property when set (we typically force form controls to fit the standard form grid)
120
+ * adding context icons for specialized form inputs
121
+ * adding gaps between inline radios/checkboxes for readability
122
+ * removing search decorations on search boxes
123
+ * styling `<blockquote>` elements
124
+ * adding context to `<q>` elements with a `cite` property (i.e., citations)
125
+ * adjustments for `<figure>` elements containing headings or blockquotes
126
+ * constraining non-root `<svg>` elements by default in a document
127
+ * styling `<dialog>` elements for better usability
128
+ * styling `<details>` elements in accordian configurations
129
+ * for `<section>`, `<p>`, and `<div>` elements within forms, `display` is set to `contents` (which acts as if the container isn't there), so also unset the element's `container-type` so it can respond to container queries on the parent container (which should be the form itself in most cases)
18
130
 
19
- ### `clairity.css`
131
+ #### [states.css]
20
132
 
133
+ * moved numerous non-state related css rules to cosmetic.css (see above)
21
134
 
22
- ### `variables.css`
135
+ #### [classes.css]
23
136
 
137
+ * moved `body > *:not(.fluid)` rule to `legacy.css`
138
+ * moved `.subgrid` alternative rules for browsers not supporting subgrid into `legacy.css`
139
+ * moved experimental non-semantic color classes (like `.red`) to `utilities.css`
140
+ * moved `.grid` and `.flex` layout classes into `components.css` as they're more component-like than simple class declarations
141
+ * removed extra negative margin (`--xs` / `--s`) on `margin-inline` for the `.100vw` and `.100dvi` classes because it was causing centering and scrollbar issues at certain viewport widths
142
+ * tentatively removed the `max-width: none;` declaration on the `.full` class because it interferes with applying `.full` within `.subgrid`
143
+ * renamed the `.section` class to `.sectioning` to reduce confusion with the `<section>` element
24
144
 
25
- ### `palette.css`
145
+ #### [components.css]
26
146
 
147
+ * moved `.grid` and `.flex` component layout classes here from `classes.css`
148
+ * make `<header>` elements that don't have `.banner` applied align its items to the `baseline` so that flexed text in the header lines up visually
149
+ * add `.subtitle` (along with `<p>`) to `<header>` subelements that flex to a full row, which forces a line wrap
150
+ * `unset` `max-width` on `.banner` items to negate `<header>` `max-width` being set to `--line-length` by default in `cosmetic.css`
151
+ * set `max-width` on `.content` and `<nav>` items in `.banner` to `100dvi` to keep `.content` and `<nav>` from overflowing the `.banner` in full-bleed situations
152
+ * for `.banner` `<nav>` direct children, set `place-self` to `flex-start center` rather than `start center` to account for flex
153
+ * moved `.button_to` mini-form (a rails-specific construct) rules here from `utilities.css`
154
+ * moved `.card`/`.cards` media query rules for browsers that don't support container queries from here to `legacy.css`
155
+ * moved `.tags + .buttons` rule for browsers that don't support `:has()` from here to `legacy.css`
156
+ * moved `.dual-aside` class to `classes.css`
27
157
 
28
- ### `functions.css`
158
+ #### [utilities.css]
29
159
 
160
+ * moved experimental non-semantic color classes (like `.red`) to here from `classes.css`
161
+ * moved `.button_to` mini-form (a rails-specific construct) rules to `components.css`
30
162
 
31
- ### `icons.css`
163
+ #### Documentation
32
164
 
165
+ * implement the [keep a changelog](https://keepachangelog.com/) format
166
+ * rewrote the copy on the `index.html` page (still a work in progress) to be more generally descriptive of the <samp class="clairity">clairity.css</samp> framework
167
+ * copied `index.html` and its sample hero image to the `public` folder, for parity with the `docs` folder (TODO: remove `public` in favor of `docs` for local testing)
168
+ * in the `docs/css` folder, separated out of `clairity.html.css` the palette-related sample css into `palette.html.css` for reuse in the `palette.html` doc page while also remaining in `clairity.html.css` as an `@import`
169
+ * updated header and footer links on existing docs/public pages (`index.html`, `about.html`, & `clairity.html`) to include newly added pages
33
170
 
34
- ### `base.css`
35
171
 
36
172
 
37
- ### `cosmetic.css`
173
+ ### Deprecated
38
174
 
39
175
 
40
- ### `states.css`
176
+ #### Documentation
41
177
 
178
+ * deprecated the `public` folder for local testing, in favor of the `docs` folder, which also serves as the [docs site](https://css.clairity.blog) on github (TODO: still need to deal with symlinks for the `assets` and `css` directories, for serving local assets without duplication)
42
179
 
43
- ### `classes.css`
44
180
 
181
+ ### Removed
45
182
 
46
- ### `components.css`
183
+ #### [palette.css]
47
184
 
185
+ * removed non-numeric/semantic lightness and chroma scales in favor of uniform numeric scales (okLCH)
48
186
 
49
- ### `utilities.css`
187
+ #### [components.css]
50
188
 
189
+ * removed `padding-inline` as a default from `footer` elements
190
+ * removed unnecessary and funky `flex-basis` calculation on `<nav>` elements inside `.nav` containers that create odd wrapping situations on `<nav>` elements at certain larger viewport widths
51
191
 
192
+ ### Fixed
52
193
 
194
+ #### [base.css]
53
195
 
54
- ## v0.1.0 - 2023-04-19
196
+ * put buttons (`button`, `[type="button"]`, `[type="submit"]`, `[type="reset"]`, and `::file-selector-button`) in the `elements` `grid-column` by default (forms default to 2-column grids), so they sit under form elements rather than under the labels
197
+
198
+ #### Documentation
199
+
200
+ * remove unused `.home` class on the `<body>` of `index.html`
201
+ * remove unnecessary `.readable` class on the `<body>` and the `.full` class on `<main>` of `about.html`, which breaks the fat footer
202
+ * removed unnecessary `.readable` class on the `<body>` of `clairity.html`, which breaks the fat footer
203
+ * clarify in `README.md` when/why gem is moved to the `pkg` directory
204
+
205
+
206
+ ### Security
207
+
208
+
209
+
210
+
211
+ ## [v0.1.2] - 2023-04-21
212
+
213
+ 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).
214
+
215
+ 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.
216
+
217
+
218
+ ### General
219
+
220
+ * TEMP: duplicate `assets` from `lib` into `docs` directory to render sample pages correctly; longer-term, need to find a better solution than duplicating files.
221
+ * 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
222
+ * add files from `public` to `docs` so they show up on the [<samp class="clairity">clairity.css</samp> home page](https://css.clairity.blog)
223
+ * 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)
224
+
225
+
226
+ ### [variables.css]
227
+
228
+ 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).
229
+
230
+ * fix the `--contrast` color
231
+ * increase default contrast of the default (light mode) `--constrast` color
232
+ * 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)
233
+ * for dark mode, lighten the `--link` color a bit
234
+
235
+
236
+ ### [palette.css]
237
+
238
+
239
+ * add `--a2` to alpha transparency scale (not sure if we need a full scale here or not)
240
+ * add `--l25` to the okLCH lightness scale (TODO: use a single lightness scale for both HSL & okLCH)
241
+ * add okLCH version of the `--primary` color scale (this fixes most of the mismatched/missing color problems when using okLCH)
242
+
243
+
244
+ ### [cosmetic.css]
245
+
246
+ * links in headings shouldn't be differentiated by color, to reduce visual distraction
247
+ * 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`)
248
+ * add the `:visited` state (which only applies to `<a>` and `<area>` elements that have an `href`) to the elements this rule applies to
249
+
250
+
251
+ ### [classes.css]
252
+
253
+ * restore `width` and `margin-inline` on `100dvi` class to address the horizontal scrollbar issue (works in some cases, but not all)
254
+ * as in `cosmetic.css` with heading elements, set the `--heading` color explicitly on unvisited and `:visited` links in heading classes
255
+
256
+
257
+ ### [components.css]
258
+
259
+ * 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)
260
+ * 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
261
+
262
+
263
+ ## [v0.1.1] - 2023-04-19
264
+
265
+ * 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)
266
+ * added sample `index.html` to docs directory to see it in action
267
+
268
+
269
+ ## [v0.1.0] - 2023-04-19
55
270
 
56
271
  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
272
 
58
273
 
59
- ### `variables.css`
274
+ ### General
275
+ * `README.md` release checklist
276
+ * update with correct `git` command to push commits with (annotated) tags
277
+ * note that `Gemfile.lock` might change, so `bundle` it again if need be
278
+
279
+
280
+ ### [variables.css]
60
281
 
61
282
  * tweak the `--small` font size from `0.9rem` to `0.875rem` for more differentiation with `--medium`
62
283
  * add the `--field-max` variable, set to `min(47ch, 100%)`, so that form fields can stretch to a reasonable (but not unreadable) length on larger screens, but take as much space as available on small screens
63
284
 
64
285
 
65
- ### `palette.css`
286
+ ### [palette.css]
66
287
 
67
288
  * similar to `--info`, `--success`, `--warning`, and `--error` semantic info colors, add semantic (icon) state colors `--valid` (green), `--invalid` (red) and `--unknown` (yellow), with `-high`, `-low` and `bg-` variants
68
289
 
69
290
 
70
- ### `icons.css`
291
+ ### [icons.css]
71
292
 
72
293
  * add `--i-home-edit`, `--i-mail-check`, `--i-mail-x`, `--i-send`, `--i-server-cog`, `--i-user-circle`, `--i-user-off` icons from tabler
73
294
 
74
295
 
75
- ### `base.css`
296
+ ### [base.css]
76
297
 
77
298
  Base acts like a css reset in that it (re-)defines the default styles of all html (pseudo-)elements.
78
299
 
@@ -82,14 +303,14 @@ Base acts like a css reset in that it (re-)defines the default styles of all htm
82
303
  * set `max-width` to `--field-max` on `<meter>` and `<progress>` elements as well
83
304
 
84
305
 
85
- ### `cosmetic.css`
306
+ ### [cosmetic.css]
86
307
 
87
308
  Cosmetic adjustments typically tweak base styles for specific situations.
88
309
 
89
310
  * remove `<body>` grid from pages that don't have a `<main>` element but do have `<h1>` and/or `<p>` elements (aka, bare pages)
90
311
 
91
312
 
92
- ### `states.css`
313
+ ### [states.css]
93
314
 
94
315
  * define link signifier `--icon`s on the element rather than its `::before` or `::after` pseudo-element, letting inheritance define it for the pseudos
95
316
  * move `mailto` link signifier icon to be `::after` the `href` link by default
@@ -99,15 +320,15 @@ Cosmetic adjustments typically tweak base styles for specific situations.
99
320
  * might want to move this base style to `cosmetic.css` (to allow it to remain part of the `classless` set of styles), or move the whole enchilada to `components.css` with the other button styles
100
321
 
101
322
 
102
- ### `classes.css`
323
+ ### [classes.css]
103
324
 
104
- * apply `width` and `margin-inline` on `100dvi` class to address the horizontal scrollbar issue (works in some cases, but not all)
325
+ * temporarily remove `width` and `margin-inline` on `100dvi` class to address the horizontal scrollbar issue
105
326
  * add semantic state color classes `.valid`, `.invalid`, and `.unknown`
106
327
  * add `.i-home-edit`, `.i-mail-check`, `.i-mail-x`, `.i-send`, `.i-server-cog`, `.i-user-circle`, `.i-user-off` icon classes
107
328
  * 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
108
329
 
109
330
 
110
- ### `components.css`
331
+ ### [components.css]
111
332
 
112
333
  * remove top margin from the `:first-child` `<header>` in the `<body>`, typically because this header is meant to sit flush with the top of the page
113
334
  * removed the `[role=banner]` selector from this rule, because a banner may not necessarily always sit at the top of the page (even if they often do), as they could be placed inside another container
@@ -131,7 +352,7 @@ Cosmetic adjustments typically tweak base styles for specific situations.
131
352
  * firefox has limited support for `:has()` currently, and it is therefore [recommended](https://www.bram.us/2023/01/04/css-has-feature-detection-with-supportsselector-you-want-has-not-has/#the-problem) that it be unused on firefox, but we're pre-release, so leave this on for now so we can see how bad it is in firefox
132
353
 
133
354
 
134
- ### `utilities.css`
355
+ ### [utilities.css]
135
356
 
136
357
  * *rails-specific*: rails adds the `.button_to` class to field-less forms it creates with the `:button_to` helper, and while this mini-form looks like a button, it tries to take up space like a form
137
358
  * taking advantage of this narrowly-targeted class, adjust widths on the form and its embedded `submit` button so it looks/behaves like other buttons
@@ -139,14 +360,13 @@ Cosmetic adjustments typically tweak base styles for specific situations.
139
360
 
140
361
 
141
362
 
142
- ## v0.0.3 - 2023-04-18
363
+ ## [v0.0.3] - 2023-04-18
143
364
 
144
365
  The changes encompassed by this release were largely completed by about October 2022 (~6 months prior), but recorded (and released) here for posterity.
145
366
 
146
367
 
147
368
  ### General
148
369
 
149
- - in `README.md`, updated the release checklist with correct `git` command to push commits with (annotated) tags
150
370
  - added `icons.css` - a minimal set of svg icons exposed as CSS variables
151
371
  - emulating the nice developer ergonomics of icon fonts, we overhauled icons entirely so that we can
152
372
  - use css variables to define svg icons (rather than being inline defined)
@@ -163,12 +383,12 @@ The changes encompassed by this release were largely completed by about October
163
383
  - added block-style comments to css files to differentiate the different sections more easily
164
384
 
165
385
 
166
- ### `clairity.css` file
386
+ ### [clairity.css]
167
387
 
168
388
  - experimented with the new `@layer` css cascade layers feature, but commented it out for now because it breaks firefox dev tools
169
389
 
170
390
 
171
- ### `variables.css`
391
+ ### [variables.css]
172
392
 
173
393
  `variables.css` defines all the custom properties (css variables) used in <samp class="clairity">clairity.css</samp> other than the color palette, which is defined in `palette.css`.
174
394
 
@@ -197,7 +417,7 @@ The changes encompassed by this release were largely completed by about October
197
417
  - comment out the redefinition of `--action` (can't remember why)
198
418
 
199
419
 
200
- ### `palette.css`
420
+ ### [palette.css]
201
421
 
202
422
  Note that the structure of the color palette, never mind the palette itself, is still very much in flux. Initially, we hoped that one of the new [LCH/okLCH color spaces](https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl) would provide a nice perceptually uniform, rich palette that could be programmatically generated and also predictably transformable using css color functions for any color we desired. We wanted to have our cake and to eat it too. But alas, neither LCH or okLCH are truly capable of hands-off, mechanical palette generation and transformation for any set of colors, because of issues like [the dark yellow problem](https://uxdesign.cc/the-dark-yellow-problem-in-design-system-color-palettes-a0db1eedc99d?gi=971e71981fd1). We still like okLCH for its other qualities and will use it where we can, but our hopes of auto-paletting purely in css were but a childlike dream.
203
423
 
@@ -217,7 +437,7 @@ So with that said, the palette will probably move toward manually-adjusted sets
217
437
  - early indications are that this doesn't work nearly as well as we'd hoped
218
438
 
219
439
 
220
- ### `functions.css`
440
+ ### [functions.css]
221
441
 
222
442
  - added `.h1, .h2, .h3, .h4, .h5, .h6` classes to fluid typography heading rule
223
443
  - removed experimental relative color scale variables (`--0` through `--15`)
@@ -229,7 +449,7 @@ So with that said, the palette will probably move toward manually-adjusted sets
229
449
  - this works in the common case but isn't quite as robust as we'd hoped (TODO: needs investigation)
230
450
 
231
451
 
232
- ### `icons.css`
452
+ ### [icons.css]
233
453
 
234
454
  Eventually, we want to have a consistent set of svg icons that are uniform and pleasing, but for now, we grab whatever we can from existing sources, so that we can figure out what the minimal set of icons we need are.
235
455
 
@@ -237,7 +457,7 @@ Eventually, we want to have a consistent set of svg icons that are uniform and p
237
457
  - added 14 [tabler icons](https://tabler-icons.io/) as well (`--i-bookmark`, `--i-browser`, `--i-calendar`, `--i-calendar-time`, `--i-external-link`, `--i-edit`, `--i-file`, `--i-file-download`, `--i-lock`, `--i-mail`, `--i-message-2`, `--i-numbers`, `--i-phone`, `--i-trash`)
238
458
 
239
459
 
240
- ### `base.css`
460
+ ### [base.css]
241
461
 
242
462
  - `*, *::before, *::after` (applies to all elements): moved non-essential defaults out of this rule (margin, padding, border, font-size, vertical-align), as `<svg>` documents can also fall under `*` (also `*` rules are less efficient, applying to everything, as it does, so minimize its use)
243
463
  - `<main>`, `<aside>`, `<article>`, `<nav>`, `<section>`, `<header>`, `<footer>`: EXPERIMENTAL - designate `inline-size` container name for these common container-type elements
@@ -256,7 +476,7 @@ Eventually, we want to have a consistent set of svg icons that are uniform and p
256
476
  - `<hr>`: make horizontal rules span the full width of a containing grid
257
477
 
258
478
 
259
- ### `cosmetic.css`
479
+ ### [cosmetic.css]
260
480
 
261
481
  This file includes cosmetic adjustments to the base elements, typically via combo selectors, which don't fit the scope of `base.css`.
262
482
 
@@ -270,7 +490,7 @@ This file includes cosmetic adjustments to the base elements, typically via comb
270
490
  - put left-side labels for checkboxes in the `elements` grid column, left-justified
271
491
 
272
492
 
273
- ### `states.css`
493
+ ### [states.css]
274
494
 
275
495
  The big change here is using css variables for svg masked icons rather than inlining them in the css, so that we can just set any icon to the `--icon` variable to get it to show up. Note that this uses a finicky masking technique that needs to be more fully documented (TODO), but we were able to support hover effects and to get it to support both light and dark modes with some mucking about with `--icon-blend-mode` (set in `variables.css`).
276
496
 
@@ -302,7 +522,7 @@ The big change here is using css variables for svg masked icons rather than inli
302
522
  - for non-root `<svg>` elements, lower the specificity using `:where()` and remove the max-width restriction
303
523
 
304
524
 
305
- ### `classes.css`
525
+ ### [classes.css]
306
526
 
307
527
  `classes.css` encompasses mostly singular helper class rules, while `components.css` encompasses rules for multiple elements designed to work together. Meanwhile, `utilities.css` is for rules that proxy a single (or perhaps a couple related) underlying css declaration as a class.
308
528
 
@@ -334,7 +554,7 @@ The big change here is using css variables for svg masked icons rather than inli
334
554
  - these allow constructs like `<i class="i-burger"></i>` to show an svg icon, similar to what font icon libraries do (e.g., fontawesome)
335
555
 
336
556
 
337
- ### `components.css`
557
+ ### [components.css]
338
558
 
339
559
  - `<body>` has a default grid applied here
340
560
  - rename `fullwidth` grid column name to just `full`
@@ -383,7 +603,7 @@ The big change here is using css variables for svg masked icons rather than inli
383
603
  - moved `<meter>` and `<progress>` pseudo-class definitions to `base.css` (which had the base element definitions already)
384
604
 
385
605
 
386
- ### `utilities.css`
606
+ ### [utilities.css]
387
607
 
388
608
  - moved `.container` here from `classes.css`
389
609
  - moved `.block` here from `classes.css`
@@ -394,7 +614,7 @@ The big change here is using css variables for svg masked icons rather than inli
394
614
  - moved `.clairity` here from `classes.css`: sets a differentiating font for our favorite css framework!
395
615
 
396
616
 
397
- ## v0.0.2 - 2023-04-15
617
+ ## [v0.0.2] - 2023-04-15
398
618
 
399
619
  After a number of diversions, including developing a (as yet unreleased) Jekyll theme for <samp class="clairity">clairity.css</samp>, our attention is back on the core css framework. This release packages <samp class="clairity">clairity.css</samp> as a Rails engine so we can use it in our Rails projects.
400
620
 
@@ -412,7 +632,7 @@ After a number of diversions, including developing a (as yet unreleased) Jekyll
412
632
  - `shims.css` - a place to put styles meant to support graceful degradation for older sites (not browsers, that goes in `legacy.css`)
413
633
 
414
634
 
415
- ## v0.0.1 - 2022-06-24
635
+ ## [v0.0.1] - 2022-06-24
416
636
 
417
637
  <samp class="clairity">clairity.css</samp> was inspired by classless css libraries like `almond.css` and `sakura.css`, as well as a longing for a nice semantic, HTML-first css framework, like a modernized Semantic UI, but employing cutting-edge css features to remove the need for css tooling (i.e., Sass).
418
638
 
@@ -421,3 +641,29 @@ After a number of diversions, including developing a (as yet unreleased) Jekyll
421
641
  - `variables.css` - structure css variables (custom properties) for flexible theming
422
642
  - `base.css` - add styling block for every html element, even if empty
423
643
  - `palette.css` - separate out the color scheme into its own css file
644
+
645
+
646
+ [unreleased]: https://github.com/clairity/clairity.css/compare/v0.2.0...HEAD
647
+ [v0.2.0]: https://github.com/clairity/clairity.css/compare/v0.1.2...v0.2.0
648
+ [v0.1.2]: https://github.com/clairity/clairity.css/compare/v0.1.1...v0.1.2
649
+ [v0.1.1]: https://github.com/clairity/clairity.css/compare/v0.1.0...v0.1.1
650
+ [v0.1.0]: https://github.com/clairity/clairity.css/compare/v0.0.3...v0.1.0
651
+ [v0.0.3]: https://github.com/clairity/clairity.css/compare/v0.0.2...v0.0.3
652
+ [v0.0.2]: https://github.com/clairity/clairity.css/compare/v0.0.1...v0.0.2
653
+ [v0.0.1]: https://github.com/clairity/clairity.css/releases/tag/v0.0.1
654
+
655
+ [clairity.basic.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity.basic.css
656
+ [clairity.classless.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity.class.css
657
+ [clairity.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity.css
658
+ [variables.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/variables.css
659
+ [palette.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/palette.css
660
+ [functions.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/functions.css
661
+ [icons.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/icons.css
662
+ [base.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/base.css
663
+ [cosmetic.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/cosmetic.css
664
+ [states.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/states.css
665
+ [classes.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/classes.css
666
+ [components.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/components.css
667
+ [utilities.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/utilities.css
668
+ [shims.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/shims.css
669
+ [legacy.css]: https://github.com/clairity/clairity.css/blob/master/lib/assets/css/clairity/legacy.css
data/README.md CHANGED
@@ -130,7 +130,8 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
130
130
 
131
131
  To install this gem onto your local machine, run `bundle exec rake install`.
132
132
 
133
- To release a new version (for gem owners), follow the release checklist in the next section (i.e., don't `rake release` yet, until we have everything set up the way we like it).
133
+ To release a new version (for gem owners), follow the release checklist in the next section (i.e., don't `rake release` yet, until we have everything set up the way we like it). TODO: consider automating using [release-please](https://dev.to/ajrom/release-please-ci-deployment-for-ruby-gems-4md6).
134
+
134
135
 
135
136
 
136
137
  ### Release Checklist
@@ -138,19 +139,22 @@ To release a new version (for gem owners), follow the release checklist in the n
138
139
  To release this gem, follow these steps:
139
140
 
140
141
  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).
142
+ 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
143
  1. run the test suite via `rake test` and fix any issues
142
144
  1. update the docs (haha, are there any docs yet?)
145
+ 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
146
  1. make sure the `CHANGELOG.md` is up to date with a summary of the changes since the last release
144
147
  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
148
  1. update the version number `X.Y.Z` in `lib/clairity.css/version.rb`
146
- 1. update the `s.files` array in `clairity.css.gemspec` with any new files outside the main gem directories (such as `lib`)
147
- 1. build the gem with `gem build clairity.css.gemspec`, which will place it in the `pkg` directory (might have to manually move it to the `pkg` directory)
149
+ 1. `Gemfile.lock` likely needs to be updated due to the version number change, so update it via `bundle && git add Gemfile.lock`
150
+ 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*
151
+ 1. build the gem with `gem build clairity.css.gemspec`
152
+ 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` (`pkg` is gitignored, so move the gem now to show a clean working directory)
148
153
  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"`
154
+ 1. `git commit -m "with a descriptive commit message here"` (or using our standard shortcut, `git cm "message"`)
150
155
  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
156
  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`
153
-
157
+ 1. push the gem (from the `pkg` directory) to rubygems: `gem push clairity.css-X.Y.Z.gem`
154
158
 
155
159
  ### Contributing
156
160
 
@@ -2,7 +2,7 @@
2
2
  BASE - these are the base styles for *all* elements and certain core pseudo-
3
3
  elments / -classes. for simple sites this stylesheet plus variables.css
4
4
  (where :root vars & color-scheme: light dark; are set) should suffice.
5
-
5
+
6
6
  Note that simple & full :is() support (without multiple declarations)
7
7
  only landed broadly in ~Jan 2020. With it came :where() support, and
8
8
  both now have forgiving selector lists. Since we're already implcitly
@@ -11,13 +11,17 @@
11
11
 
12
12
  specificity is a 4-element designation:
13
13
  [inline, #id, .class/[attr]/:pseudo-class, element/::pseudo-element]
14
-
14
+
15
15
  we'll generally shoot for [0001] specificity in this base.css file,
16
16
  with a few notable exceptions, like button-type input elements and
17
17
  [multiple] selects, and relegate higher specificity niceties to the
18
18
  states.css stylesheet. exceptions have [0010] or [0011] specificity.
19
-
20
- Quickly search for elements using hashtag syntax, e.g., #a for anchors.
19
+
20
+ Quickly search for elements using hashtag syntax, e.g., #a for anchors,
21
+ reducing unwanted matches and better narrowing in on what you searched.
22
+
23
+ NOTE that a <meta charset="utf-8"> declaration is needed to get certain
24
+ non-Latin glyphs (like open-quote in blockquotes) to render correctly.
21
25
 
22
26
  A few key styles from normalize.css are repeated here, and marked as
23
27
  such via comments, in case normalize.css is not being used.
@@ -115,7 +119,7 @@ noscript { }
115
119
  /* container queries - default names/types for common container elements -
116
120
  EXPERIMENTAL - only safari 16+ & chrome 93+ behind a flag for now
117
121
  // .......................................................................... */
118
- main, aside, article, nav, section, header, footer {
122
+ main, aside, article, nav, section, form, header, footer {
119
123
  container-type: inline-size;
120
124
  /*font-size: clamp(1rem, 1rem + 1cqi, 2rem);*/
121
125
  }
@@ -124,6 +128,7 @@ aside { container-name: aside; }
124
128
  article { container-name: article; }
125
129
  nav { container-name: nav; }
126
130
  section { container-name: section; }
131
+ form { container-name: form; }
127
132
  header { container-name: header; }
128
133
  footer { container-name: footer; }
129
134
 
@@ -404,7 +409,9 @@ button, [type="button"],[type="submit"],[type="reset"], ::file-selector-button {
404
409
  padding: 0 var(--m);
405
410
  border: var(--solid) var(--transparent);
406
411
  border-radius: var(--radius);
412
+
407
413
  /*vertical-align: bottom;*/
414
+ grid-column: elements;
408
415
  }
409
416
  /* #reset */
410
417
  [type="reset"] { /* [0010] specificity */
@@ -901,7 +908,7 @@ hr, hr:hover {
901
908
  margin: var(--l) auto;
902
909
  max-width: var(--width);
903
910
  width: 50%;
904
- grid-column: 1 / -1; /* span full width of a enclosing grid */
911
+ grid-column: 1 / -1; /* span full width of an enclosing grid */
905
912
  }
906
913
 
907
914
  /* #disabled - needs to be last to "beat" the other [0010] specificity rules