clairity.css 0.1.2 → 0.2.0
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 +227 -45
- data/README.md +5 -5
- data/lib/assets/css/clairity/base.css +13 -6
- data/lib/assets/css/clairity/classes.css +42 -104
- data/lib/assets/css/clairity/components.css +74 -45
- data/lib/assets/css/clairity/cosmetic.css +359 -5
- data/lib/assets/css/clairity/legacy.css +65 -0
- data/lib/assets/css/clairity/palette.css +308 -225
- data/lib/assets/css/clairity/states.css +3 -295
- data/lib/assets/css/clairity/utilities.css +39 -7
- data/lib/assets/css/clairity.css +4 -1
- data/lib/assets/images/fiery_sunburst.jpg +0 -0
- data/lib/clairity.css/version.rb +1 -1
- metadata +4 -2
@@ -81,18 +81,6 @@ STATES - these are convenience styles that go beyond defining the base elements.
|
|
81
81
|
text-decoration: none;
|
82
82
|
}
|
83
83
|
|
84
|
-
/* #mailto #tel #sms #file #external #bookmark #download - special link icons -
|
85
|
-
this uses the svg mask technique to place & color icons on hover; as such, it
|
86
|
-
must be in a separate pseudo-element so masking doesn't bleed out to text */
|
87
|
-
/* #icons - set --icon to an svg from icons.css, set color with --icon-color */
|
88
|
-
[href^="tel:"] { --icon: var(--i-phone); }
|
89
|
-
[href^="sms:"] { --icon: var(--i-message-2); }
|
90
|
-
[href^="file:"] { --icon: var(--i-file); }
|
91
|
-
[download] { --icon: var(--i-file-download); }
|
92
|
-
[href^="mailto:"] { --icon: var(--i-mail); }
|
93
|
-
[rel~="external"] { --icon: var(--i-external-link); }
|
94
|
-
[rel~="bookmark"] { --icon: var(--i-bookmark); }
|
95
|
-
|
96
84
|
/* chrome still needs prefixed -webkit-mask as of 20221001 */
|
97
85
|
:where([href^="tel:"], [href^="sms:"], [href^="file:"], [download])::before,
|
98
86
|
:where([href^="mailto:"], [rel~="external"], [rel~="bookmark"])::after {
|
@@ -113,9 +101,6 @@ a:where([href^="mailto:"], [href^="tel:"], [href^="sms:"], [href^="file:"],
|
|
113
101
|
--icon-color: var(--active);
|
114
102
|
}
|
115
103
|
|
116
|
-
/* give followed fragment links some room at the top - [0010] specificity */
|
117
|
-
[id] { scroll-margin-top: var(--l); }
|
118
|
-
|
119
104
|
/* #:any-link matches both :link and :visited for anchors with an href; safari
|
120
105
|
support is currently lagging, so don't use for now */
|
121
106
|
:any-link { }
|
@@ -126,56 +111,22 @@ a:where([href^="mailto:"], [href^="tel:"], [href^="sms:"], [href^="file:"],
|
|
126
111
|
/* -----------------------------------------------------------------------------
|
127
112
|
// #lists - ordered and unordered lists of items
|
128
113
|
// -------------------------------------------------------------------------- */
|
129
|
-
/* #ul #ol - removes vertical gaps for lists within lists - uses :where() to get
|
130
|
-
[0001] specificity rather than [0002] */
|
131
|
-
:where(ul, ol) :is(ul, ol) { margin: 0; }
|
132
114
|
|
133
115
|
|
134
116
|
/* -----------------------------------------------------------------------------
|
135
117
|
// #tables - for tabular data
|
136
118
|
// -------------------------------------------------------------------------- */
|
137
119
|
|
138
|
-
/* makes the first column sticky - [0012] specificity */
|
139
|
-
:not(tfoot) > tr th:first-of-type {
|
140
|
-
position: sticky; /* works best w/ <table> display ≅ block */
|
141
|
-
left: 0;
|
142
|
-
background-color: var(--background); /* is transparent otherwise */
|
143
|
-
}
|
144
|
-
/* makes the table header row sticky - [0002] specificity */
|
145
|
-
thead th {
|
146
|
-
position: sticky;
|
147
|
-
top: 0;
|
148
|
-
z-index: 1; /* puts header row on top of tbody rows, including
|
149
|
-
header column */
|
150
|
-
background-color: var(--background); /* is transparent otherwise */
|
151
|
-
}
|
152
|
-
/* sticks top left box on top of both header columns/rows - [0012] specificity*/
|
153
|
-
thead th:first-child { z-index: 2; }
|
154
|
-
|
155
|
-
/* zebra-striping of table rows - [0013] specificity */
|
156
|
-
tbody tr:nth-child(even), tbody tr:nth-child(even) th {
|
157
|
-
background-color: var(--bg-contrast);
|
158
|
-
}
|
159
|
-
/* this is more robust because it excludes hidden rows, but only safari and
|
160
|
-
chrome support this syntax - [0023] specificity */
|
161
|
-
@supports selector(:nth-child(even of :not([hidden]))) {
|
162
|
-
tbody tr:where(:nth-child( even of :not([hidden]) )),
|
163
|
-
tbody tr:where(:nth-child( even of :not([hidden]) )) th {
|
164
|
-
background-color: var(--bg-contrast);
|
165
|
-
}}
|
166
|
-
|
167
120
|
/* hover effect for table rows */
|
168
121
|
tbody tr:hover, tbody tr:hover th {
|
169
122
|
background-color: var(--contrast);
|
170
123
|
}
|
171
|
-
/* adds sticky borders below thead and above tfoot */
|
172
|
-
thead tr:last-of-type th {box-shadow: inset 0 -2px var(--secondary, --neutral);}
|
173
|
-
tfoot :where(td, th) {box-shadow: inset 0 2px var(--secondary, --neutral);}
|
174
124
|
|
175
125
|
|
176
126
|
/* -----------------------------------------------------------------------------
|
177
127
|
// #forms - for submitting data to the server
|
178
128
|
// -------------------------------------------------------------------------- */
|
129
|
+
|
179
130
|
/* #form #fieldset #focus-within - highlight whole forms & fieldsets when one of
|
180
131
|
its contained elements is focused - [0010] specificity */
|
181
132
|
:where(form, fieldset):focus-within {
|
@@ -187,103 +138,11 @@ tfoot :where(td, th) {box-shadow: inset 0 2px var(--secondary, --neutral);}
|
|
187
138
|
border-color: var(--border);
|
188
139
|
}
|
189
140
|
|
190
|
-
/* #form #ul - since lists in forms typically list out form controls, remove
|
191
|
-
the bullet styling from them - [0002] specificity */
|
192
|
-
form ul { list-style: none; }
|
193
|
-
|
194
|
-
/* #form #section #p #div - subgrid is firefox 71+ & safari 16+ only 20221001 */
|
195
|
-
@supports (grid-template-columns: subgrid) {
|
196
|
-
/* :where() can be used here, since @supports is also a recent addition */
|
197
|
-
form :where(section, p, div) { /* [0001] specificity */
|
198
|
-
grid-column: full;
|
199
|
-
display: grid;
|
200
|
-
grid-template-columns: subgrid;
|
201
|
-
gap: inherit;
|
202
|
-
}}
|
203
|
-
/*form section :where(h1,h2,h3,h4,h5,h6) + p { display: block; }*/
|
204
|
-
|
205
|
-
/* chrome/edge doesn't support subgrid yet but does support :has() & :where() */
|
206
|
-
@supports selector(:has(*)) {
|
207
|
-
fieldset:where(:has(label, input, button, textarea, select, fieldset)) {
|
208
|
-
margin: 0;
|
209
|
-
display: grid;
|
210
|
-
grid-template-columns:[labels full-start] 3fr [elements] 7fr [full-end];
|
211
|
-
gap: var(--m);
|
212
|
-
}
|
213
|
-
fieldset:where(:has(p :is([type='checkbox'], [type='radio'])):not(:has(select,
|
214
|
-
textarea, [type="text"], [type="date"], [type="email"], [type="password"],
|
215
|
-
[type="datetime-local"], [type="search"]))) {
|
216
|
-
row-gap: 0;
|
217
|
-
}
|
218
|
-
/* since grid properties fall through p tags, assign margin-top to first child
|
219
|
-
elements to get a gap between paragraphs of different input types */
|
220
|
-
fieldset p:has([type='checkbox'], [type='radio']) + p:has([type='radio'],
|
221
|
-
[type='checkbox']) :is([type='radio'], [type='checkbox'],
|
222
|
-
label):first-of-type {
|
223
|
-
margin-top: var(--m);
|
224
|
-
}
|
225
|
-
/* chrome/edge doesn't support subgrid, so pierce the grid barrier instead */
|
226
|
-
fieldset :where(p:has(label, input, button, textarea, select, fieldset)) {
|
227
|
-
display: contents;
|
228
|
-
}
|
229
|
-
/* labels go on the labels gridline */
|
230
|
-
:where(fieldset :is(p, div)) label {
|
231
|
-
grid-column: labels;
|
232
|
-
}
|
233
|
-
/* lists that contain radios/checkboxes go on the elements gridline */
|
234
|
-
form:has(fieldset :where(select, textarea, [type="text"], [type="date"],
|
235
|
-
[type="email"], [type="password"], [type="datetime-local"],
|
236
|
-
[type="search"])) fieldset ul:has(li label :where([type='radio'],
|
237
|
-
[type='checkbox'])) {
|
238
|
-
grid-column: elements;
|
239
|
-
}
|
240
|
-
|
241
|
-
/* inputs on the elements gridline; pad right side away from fieldset line */
|
242
|
-
:where(fieldset) :where(p):has(input, button, textarea, select, fieldset)
|
243
|
-
:where(input:not(:is([type='checkbox'],[type='radio']), button,
|
244
|
-
textarea, select, fieldset)) {
|
245
|
-
grid-column: elements;
|
246
|
-
margin-right: var(--m);
|
247
|
-
}
|
248
|
-
/* for radios & checks, invert the placement of the input and label */
|
249
|
-
:where(fieldset) :where(p):has(label) :where([type='checkbox'],
|
250
|
-
[type='radio']):has(+ label) {
|
251
|
-
grid-column: labels;
|
252
|
-
align-self: center;
|
253
|
-
justify-self: end;
|
254
|
-
}
|
255
|
-
:where(fieldset p:has(label) :is([type='checkbox'],
|
256
|
-
[type='radio']):has(+ label)) + label {
|
257
|
-
grid-column: elements;
|
258
|
-
justify-self: start;
|
259
|
-
}
|
260
|
-
/* for paragraph tags that aren't form element containers, span the grid */
|
261
|
-
:where(fieldset) :where(p, div, h2, h3, h4, h5, h6):not(:has(label, input,
|
262
|
-
button, textarea, select, fieldset)) {
|
263
|
-
display: block;
|
264
|
-
grid-column: full;
|
265
|
-
}
|
266
|
-
}
|
267
|
-
/*form :where(fieldset, input, select, button, input[type="button"]) {
|
268
|
-
grid-column: elements;
|
269
|
-
}*/
|
270
|
-
|
271
|
-
fieldset > :last-child {
|
272
|
-
margin-bottom: 0;
|
273
|
-
}
|
274
|
-
|
275
141
|
|
276
142
|
/* -----------------------------------------------------------------------------
|
277
143
|
// #inputs - standard form input elements
|
278
144
|
// -------------------------------------------------------------------------- */
|
279
145
|
|
280
|
-
/* if [size] is set on an input, respect that choice - [0011] specificity */
|
281
|
-
input[size] {
|
282
|
-
width: fit-content;
|
283
|
-
min-width: unset;
|
284
|
-
max-width: unset;
|
285
|
-
}
|
286
|
-
|
287
146
|
/* #input #optgroup #option #textarea #select #read-only #focus - bg field icons
|
288
147
|
are Field system color by default, and --icon-color on focus/hover */
|
289
148
|
:where(input, optgroup, option, textarea, select):focus {
|
@@ -291,48 +150,6 @@ input[size] {
|
|
291
150
|
--icon-color: var(--primary);
|
292
151
|
}
|
293
152
|
|
294
|
-
/* input images */
|
295
|
-
[type="date"], [type="time"], [type="datetime"], [type="datetime-local"],
|
296
|
-
[type="month"], [type="week"], [type="url"], [type="email"],
|
297
|
-
[type="number"], [type="tel"], [type="password"], [type="search"] {
|
298
|
-
padding-left: var(--height);
|
299
|
-
background-blend-mode: var(--icon-blend-mode);
|
300
|
-
}
|
301
|
-
[type="date"], [type="month"], [type="week"] {
|
302
|
-
background-image: var(--colorize-icon), var(--i-calendar); }
|
303
|
-
[type="datetime"], [type="datetime-local"], [type="time"] {
|
304
|
-
background-image: var(--colorize-icon), var(--i-calendar-time); }
|
305
|
-
[type="url"] { background-image: var(--colorize-icon), var(--i-browser); }
|
306
|
-
[type="email"] { background-image: var(--colorize-icon), var(--i-mail); }
|
307
|
-
[type="number"] { background-image: var(--colorize-icon), var(--i-numbers); }
|
308
|
-
[type="tel"] { background-image: var(--colorize-icon), var(--i-phone); }
|
309
|
-
[type="password"]{ background-image: var(--colorize-icon), var(--i-lock); }
|
310
|
-
[type="search"] { background-image: var(--colorize-icon), var(--i-search); }
|
311
|
-
|
312
|
-
/*@media (prefers-color-scheme: dark) {
|
313
|
-
[type="date"], [type="time"], [type="datetime"], [type="datetime-local"],
|
314
|
-
[type="week"], [type="month"], [type="url"], [type="email"],
|
315
|
-
[type="number"], [type="tel"], [type="password"], [type="search"] {
|
316
|
-
mask: var(--icon) no-repeat center left / var(--field-icon);
|
317
|
-
background-color: var(--icon-color);
|
318
|
-
mask-repeat: no-repeat;
|
319
|
-
background-image: unset;
|
320
|
-
}
|
321
|
-
[type="date"], [type="month"], [type="week"] { --icon: var(--i-calendar); }
|
322
|
-
[type="datetime"], [type="datetime-local"], [type="time"] {
|
323
|
-
--icon: var(--i-calendar-time); }
|
324
|
-
[type="url"] { --icon: var(--i-browser); }
|
325
|
-
[type="email"] { --icon: var(--i-mail); }
|
326
|
-
[type="number"] { --icon: var(--i-numbers); }
|
327
|
-
[type="tel"] { --icon: var(--i-phone); }
|
328
|
-
[type="password"]{ --icon: var(--i-lock); }
|
329
|
-
[type="search"] { --icon: var(--i-search); }
|
330
|
-
}*/
|
331
|
-
|
332
|
-
/* hide nav search's placeholder text if the background icon is present; opacity
|
333
|
-
is used here because other methods are disallowed on ::placeholder - [0001]*/
|
334
|
-
:where(nav) :where([type="search"])::placeholder { opacity: 0; }
|
335
|
-
|
336
153
|
:where(input, optgroup, option, textarea, select):required:is(:valid,:in-range){
|
337
154
|
border-color: var(--success-high, forestgreen);
|
338
155
|
}
|
@@ -345,7 +162,7 @@ input[size] {
|
|
345
162
|
:where(textarea, [type="text"], [type="date"], [type="time"], [type="datetime"],
|
346
163
|
[type="datetime-local"], [type="month"],[type="week"], [type="email"],
|
347
164
|
[type="password"], [type="url"], [type="tel"], [type="number"],
|
348
|
-
[type="search"]):read-only:enabled {
|
165
|
+
[type="search"], input:not([type])):read-only:enabled {
|
349
166
|
border-style: none;
|
350
167
|
}
|
351
168
|
|
@@ -395,7 +212,7 @@ input[size] {
|
|
395
212
|
border-color: var(--highlighted);
|
396
213
|
}
|
397
214
|
*/
|
398
|
-
/* #:user-invalid -
|
215
|
+
/* #:user-invalid - firefox only for now - EXPERIMENTAL */
|
399
216
|
:where(input, optgroup, option, textarea, select):user-invalid {
|
400
217
|
border-color: var(--error-high, firebrick);
|
401
218
|
}
|
@@ -442,12 +259,6 @@ input[size] {
|
|
442
259
|
background-color: var(--deactivated); /* greyed-out "check" */
|
443
260
|
}
|
444
261
|
|
445
|
-
/* if radios/checkboxes are inline, insert a gap between them for readability */
|
446
|
-
:where([type="radio"] + label, [type="checkbox"] + label) +
|
447
|
-
:is([type="radio"], [type="checkbox"]) { /* [0010] specificity */
|
448
|
-
margin-left: var(--m);
|
449
|
-
}
|
450
|
-
|
451
262
|
/* inputs are (somewhat unspecified as) "replaced elements" & therefore can't
|
452
263
|
have ::before or ::after pseudo-elements on itself; use on label instead */
|
453
264
|
/* mark required fields' labels; labels usually follow checkboxes & radios */
|
@@ -471,19 +282,6 @@ input[size] {
|
|
471
282
|
}
|
472
283
|
|
473
284
|
|
474
|
-
/* -----------------------------------------------------------------------------
|
475
|
-
// specialized inputs - #date #time #datetime-local #month #week #datetime
|
476
|
-
// #email #password #search #file #image #url #tel #color
|
477
|
-
// #range #number #hidden
|
478
|
-
// -------------------------------------------------------------------------- */
|
479
|
-
|
480
|
-
/* search decorations - [0011] specificity */
|
481
|
-
[type="search"]::-webkit-search-cancel-button,
|
482
|
-
[type="search"]::-webkit-search-decoration {
|
483
|
-
appearance: none; /* needed? */
|
484
|
-
}
|
485
|
-
|
486
|
-
|
487
285
|
/* -----------------------------------------------------------------------------
|
488
286
|
// #buttons - <button>s and <input>s of type=button, reset, and submit
|
489
287
|
// -------------------------------------------------------------------------- */
|
@@ -588,14 +386,6 @@ select:not(:disabled, [disabled]):hover, select:active { /* dropdown chevron */
|
|
588
386
|
var(--checked, LinkText) 0%, var(--checked, LinkText) 100%);
|
589
387
|
}
|
590
388
|
|
591
|
-
/* #label for taller #multiple #textarea should align top - firefox 106 still
|
592
|
-
doesn't properly support :has() with combinator selectors */
|
593
|
-
@supports selector(:has(*)) {
|
594
|
-
label:where(:has(+ [multiple],+ textarea,+ select[size])){/*[0001] specificity*/
|
595
|
-
vertical-align: top;
|
596
|
-
align-self: start;
|
597
|
-
}}
|
598
|
-
|
599
389
|
|
600
390
|
/* -----------------------------------------------------------------------------
|
601
391
|
// #outputs - informational output/display
|
@@ -613,34 +403,11 @@ progress:hover { border-color: revert; }
|
|
613
403
|
// #block text elements - elements that contain text blocks
|
614
404
|
// -------------------------------------------------------------------------- */
|
615
405
|
|
616
|
-
blockquote::before { /* [0002] specificity is the least possible here */
|
617
|
-
content: open-quote;
|
618
|
-
color: var(--pale);
|
619
|
-
font-size: 5rem;
|
620
|
-
font-family: var(--serif);
|
621
|
-
left: var(--xs);
|
622
|
-
line-height: 1;
|
623
|
-
position: absolute;
|
624
|
-
top: 0;
|
625
|
-
z-index: -1;
|
626
|
-
}
|
627
|
-
blockquote > :first-child { /* [0011] specificity */
|
628
|
-
margin-top: 0;
|
629
|
-
text-indent: var(--m);
|
630
|
-
}
|
631
|
-
blockquote > :last-child { /* [0011] specificity */
|
632
|
-
margin-bottom: 0;
|
633
|
-
}
|
634
|
-
|
635
406
|
|
636
407
|
/* -----------------------------------------------------------------------------
|
637
408
|
// #inline elements - elements that occur principally within text blocks
|
638
409
|
// -------------------------------------------------------------------------- */
|
639
410
|
|
640
|
-
/* #q - inline quotations -note that you must add the closing smart quote as
|
641
|
-
<q>'s automatic quotes are added via pseudo elements */
|
642
|
-
q[cite]::after { content: "” (cf. " attr(cite) ") "; }
|
643
|
-
|
644
411
|
/* #kbd #hover - remove default :hover styles - [0011] specificity */
|
645
412
|
kbd:hover { border: var(--solid) var(--distinguished); }
|
646
413
|
|
@@ -655,28 +422,6 @@ kbd:hover { border: var(--solid) var(--distinguished); }
|
|
655
422
|
|
656
423
|
/* #figure */
|
657
424
|
figure:hover { border-color: var(--border); }
|
658
|
-
/* #figure #headings - #h1 #h2 #h3 #h4 #h5 #h6 ~*/
|
659
|
-
figure > :where(h1,h2,h3,h4,h5,h6):first-child { margin-top: 0; }
|
660
|
-
|
661
|
-
/* #blockquote inside #figure - safari only for now - :where is older than :has
|
662
|
-
so it can be used here to reduce specificity - [0001] specificity */
|
663
|
-
figure:where(:has(blockquote)) {
|
664
|
-
background-color: revert;
|
665
|
-
}
|
666
|
-
/* fix doubled margin of a blockquote in a figure - [0002] specificity */
|
667
|
-
figure > blockquote {
|
668
|
-
text-align: start;
|
669
|
-
margin: var(--ms);
|
670
|
-
padding: var(--ms);
|
671
|
-
max-width: calc(var(--line-length) - (var(--ms) * 2));
|
672
|
-
}
|
673
|
-
|
674
|
-
/* #svg - [0001] specificity */
|
675
|
-
svg:not(:where(:root)) {
|
676
|
-
width: var(--m);
|
677
|
-
/*max-width: 100%;*/
|
678
|
-
overflow: hidden;
|
679
|
-
}
|
680
425
|
|
681
426
|
/* #audio - audio w/p controls shouldn't take up space - [0011] specificity */
|
682
427
|
audio:not([controls]) {
|
@@ -699,28 +444,6 @@ audio:not([controls]) {
|
|
699
444
|
// #interactive - built-in interactive components
|
700
445
|
// -------------------------------------------------------------------------- */
|
701
446
|
|
702
|
-
/* #dialog - built-in modal overlay - comes with 'Esc' support with no js! */
|
703
|
-
/* wrap long dialogs in a container to scroll the body content sans button */
|
704
|
-
dialog > :where(div, section, article) {
|
705
|
-
overflow-y: auto; /* scrolls as necessary w/ height set */
|
706
|
-
max-height: calc(80vh * 0.8); /* container queries needed! */
|
707
|
-
}
|
708
|
-
|
709
|
-
dialog button {
|
710
|
-
margin-top: var(--ms);
|
711
|
-
}
|
712
|
-
|
713
|
-
dialog :where(h1, h2, h3, h4, h5, h6) {
|
714
|
-
border-bottom: var(--solid) var(--border);
|
715
|
-
border-radius: var(--radius) var(--radius) 0 0;
|
716
|
-
color: var(--distinct); /* differentiate dialog headings */
|
717
|
-
font-size: var(--large); /* dialogs typically only need 1 heading
|
718
|
-
level, so make it all the same size */
|
719
|
-
margin: 0 0 0 calc(-1 * var(--m)); /* negative left margin
|
720
|
-
lines up heading with paragraph text */
|
721
|
-
padding: 0 var(--m) var(--m); /* top padding provided by dialog
|
722
|
-
padding so remove it here */
|
723
|
-
}
|
724
447
|
|
725
448
|
/* #details - an accordion-like widget for question & answer style layouts */
|
726
449
|
/* #summary - the 'question' sub-element of details */
|
@@ -728,21 +451,6 @@ details:where([open]) summary {
|
|
728
451
|
border-bottom: var(--solid) var(--border);
|
729
452
|
}
|
730
453
|
|
731
|
-
details + details {
|
732
|
-
border-top: 0;
|
733
|
-
border-radius: 0;
|
734
|
-
}
|
735
|
-
|
736
|
-
details:first-of-type {
|
737
|
-
border-top-left-radius: var(--radius);
|
738
|
-
border-top-right-radius: var(--radius);
|
739
|
-
}
|
740
|
-
|
741
|
-
details:last-of-type {
|
742
|
-
border-bottom-left-radius: var(--radius);
|
743
|
-
border-bottom-right-radius: var(--radius);
|
744
|
-
}
|
745
|
-
|
746
454
|
|
747
455
|
/* -----------------------------------------------------------------------------
|
748
456
|
// #breaks - spacing elements
|
@@ -7,7 +7,7 @@
|
|
7
7
|
/* #visually-hidden - provide non-visual information semantically & accessibly*/
|
8
8
|
/* :not() with a selection list has poor backwards compatibility as of 2022, so
|
9
9
|
use separate :not() clauses for now */
|
10
|
-
.visually-hidden:not(:focus):not(:active):not(:focus-within) {
|
10
|
+
.visually-hidden:not(:focus):not(:active):not(:focus-within) { /* ie9+ */
|
11
11
|
position: absolute;
|
12
12
|
width: 1px;
|
13
13
|
height: 1px;
|
@@ -36,6 +36,8 @@
|
|
36
36
|
/* override display mode to be block */
|
37
37
|
.block { display: block; }
|
38
38
|
|
39
|
+
/*.center { margin-inline: auto; }*/
|
40
|
+
|
39
41
|
/* horizontally center text and menu items */
|
40
42
|
.centered { text-align: center; }
|
41
43
|
.centered menu { justify-content: center; } /* [0011] specificity */
|
@@ -52,13 +54,22 @@
|
|
52
54
|
.shadow { box-shadow: var(--shadow) var(--300); }
|
53
55
|
|
54
56
|
|
55
|
-
|
56
|
-
|
57
|
-
|
57
|
+
/* -----------------------------------------------------------------------------
|
58
|
+
// #colors - utility classes for setting the --color variable - EXPERIMENTAL
|
59
|
+
// -------------------------------------------------------------------------- */
|
60
|
+
|
61
|
+
.red { --color: var(--error); }
|
62
|
+
.orange { --color: var(--error); }
|
63
|
+
.yellow { --color: var(--warning); }
|
64
|
+
.lime { --color: var(--error); }
|
65
|
+
.green { --color: var(--success); }
|
66
|
+
.aqua { --color: var(--error); }
|
67
|
+
.blue { --color: var(--info); }
|
68
|
+
.indigo { --color: var(--error); }
|
69
|
+
.purple { --color: var(--error); }
|
70
|
+
.violet { --color: var(--error); }
|
71
|
+
.magenta { --color: var(--error); }
|
58
72
|
|
59
|
-
form.button_to > [type="submit"] {
|
60
|
-
width: max-content;
|
61
|
-
}
|
62
73
|
|
63
74
|
/* -----------------------------------------------------------------------------
|
64
75
|
// #clairity - special font just for fun
|
@@ -66,3 +77,24 @@ form.button_to > [type="submit"] {
|
|
66
77
|
.clairity { font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode",
|
67
78
|
"Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans",
|
68
79
|
"Liberation Sans", Verdana, "Verdana Ref",sans-serif;}
|
80
|
+
|
81
|
+
|
82
|
+
/* -----------------------------------------------------------------------------
|
83
|
+
// #accessibility - support user accessibility preferences where feasible
|
84
|
+
// -------------------------------------------------------------------------- */
|
85
|
+
|
86
|
+
/* see https://css-tricks.com/a-complete-guide-to-css-media-queries/
|
87
|
+
and https://web.dev/prefers-reduced-motion/
|
88
|
+
// .......................................................................... */
|
89
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
90
|
+
*, ::before, ::after {
|
91
|
+
/* Very short durations means JavaScript that relies on events still works */
|
92
|
+
animation-delay: 1ms !important;
|
93
|
+
animation-duration: 1ms !important;
|
94
|
+
transition-delay: 1ms !important;
|
95
|
+
transition-duration: 1ms !important;
|
96
|
+
animation-iteration-count: 1 !important;
|
97
|
+
scroll-behavior: auto !important;
|
98
|
+
background-attachment: initial !important;
|
99
|
+
}
|
100
|
+
}
|
data/lib/assets/css/clairity.css
CHANGED
@@ -103,7 +103,10 @@
|
|
103
103
|
|
104
104
|
/* shims - supports certain common markup patterns that are less semantic.
|
105
105
|
Import these when adding clairity.css to older sites. [OPTIONAL] */
|
106
|
-
|
106
|
+
@import "clairity/shims.css"/* layer(clairity.utilities);*/
|
107
107
|
|
108
108
|
/* legacy - provides graceful degradation for older browsers. [OPTIONAL] */
|
109
109
|
/*@import "clairity/legacy.css" layer(clairity.utilities);*/
|
110
|
+
|
111
|
+
/* TODO: print - stylesheet for adjusting pages for print. [OPTIONAL] */
|
112
|
+
/*@import "clairity/print.css" print;*/
|
Binary file
|
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.
|
4
|
+
version: 0.2.0
|
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-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -81,12 +81,14 @@ files:
|
|
81
81
|
- lib/assets/css/clairity/cosmetic.css
|
82
82
|
- lib/assets/css/clairity/functions.css
|
83
83
|
- lib/assets/css/clairity/icons.css
|
84
|
+
- lib/assets/css/clairity/legacy.css
|
84
85
|
- lib/assets/css/clairity/normalize.css
|
85
86
|
- lib/assets/css/clairity/palette.css
|
86
87
|
- lib/assets/css/clairity/shims.css
|
87
88
|
- lib/assets/css/clairity/states.css
|
88
89
|
- lib/assets/css/clairity/utilities.css
|
89
90
|
- lib/assets/css/clairity/variables.css
|
91
|
+
- lib/assets/images/fiery_sunburst.jpg
|
90
92
|
- lib/assets/images/input-image.png
|
91
93
|
- lib/assets/images/logo.png
|
92
94
|
- lib/assets/images/profile-avatar.png
|