@gridkitjs/theme-css 0.0.0-dev-20261126174127 → 0.0.0-dev-20261126194046
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.
- package/package.json +1 -1
- package/src/forms.css +78 -4
- package/src/presets/spreadsheet.css +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridkitjs/theme-css",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20261126194046",
|
|
4
4
|
"description": "Plain-CSS theme for GridKit — palette tokens, dark mode and grid styles, no Tailwind needed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Blagoja Blazhevski",
|
package/src/forms.css
CHANGED
|
@@ -499,6 +499,55 @@
|
|
|
499
499
|
transform: translateY(-50%) scale(0.75);
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
+
/*
|
|
503
|
+
* Under `gridkit-forms-floating-above`, on the field or on any ancestor,
|
|
504
|
+
* a raised label sits above the control instead, where a top label sits:
|
|
505
|
+
* full size, in line with the control's inline start, and the top label's
|
|
506
|
+
* gap above the control. The field always keeps that room above the
|
|
507
|
+
* control, so rising never moves anything else. The label's top is the
|
|
508
|
+
* control's top, so it rests where it does without the class; risen, it
|
|
509
|
+
* moves up by its own height and the gap, and out by its inset and
|
|
510
|
+
* padding.
|
|
511
|
+
*/
|
|
512
|
+
.gridkit-forms-field.is-label-floating:not(.is-display):is(
|
|
513
|
+
.gridkit-forms-floating-above,
|
|
514
|
+
.gridkit-forms-floating-above *
|
|
515
|
+
)
|
|
516
|
+
> .gridkit-forms-field-control {
|
|
517
|
+
padding-block-start: calc(1.25em + var(--gridkit-spacing) * 1.5);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.gridkit-forms-field.is-label-floating:not(.is-display):is(
|
|
521
|
+
.gridkit-forms-floating-above,
|
|
522
|
+
.gridkit-forms-floating-above *
|
|
523
|
+
)
|
|
524
|
+
.gridkit-forms-field-label {
|
|
525
|
+
inset-block-start: calc(1.25em + var(--gridkit-spacing) * 1.5);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.gridkit-forms-field.is-label-floating:not(.is-display):is(
|
|
529
|
+
.is-label-raised,
|
|
530
|
+
:has(:autofill)
|
|
531
|
+
):is(.gridkit-forms-floating-above, .gridkit-forms-floating-above *)
|
|
532
|
+
.gridkit-forms-field-label {
|
|
533
|
+
background-color: transparent;
|
|
534
|
+
transform: translate(
|
|
535
|
+
calc(var(--gridkit-spacing) * -2),
|
|
536
|
+
calc(-100% - var(--gridkit-spacing) * 1.5)
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.gridkit-forms-field.is-label-floating:not(.is-display):is(
|
|
541
|
+
.is-label-raised,
|
|
542
|
+
:has(:autofill)
|
|
543
|
+
):is(.gridkit-forms-floating-above, .gridkit-forms-floating-above *)
|
|
544
|
+
.gridkit-forms-field-label:dir(rtl) {
|
|
545
|
+
transform: translate(
|
|
546
|
+
calc(var(--gridkit-spacing) * 2),
|
|
547
|
+
calc(-100% - var(--gridkit-spacing) * 1.5)
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
502
551
|
/*
|
|
503
552
|
* The placeholder shows only once the label is out of its way, fading in
|
|
504
553
|
* as the label rises.
|
|
@@ -1209,16 +1258,41 @@
|
|
|
1209
1258
|
outline-offset: 2px;
|
|
1210
1259
|
}
|
|
1211
1260
|
|
|
1261
|
+
/* The summary already takes `--gridkit-font-size`, so its title scales from it. */
|
|
1212
1262
|
.gridkit-forms-message-summary-title {
|
|
1213
1263
|
margin: 0;
|
|
1214
|
-
font-size: var(
|
|
1215
|
-
--gridkit-forms-section-title-font-size,
|
|
1216
|
-
calc(var(--gridkit-font-size) * 1.125)
|
|
1217
|
-
);
|
|
1264
|
+
font-size: var(--gridkit-forms-section-title-font-size, 1.125em);
|
|
1218
1265
|
font-weight: var(--gridkit-forms-section-title-font-weight, 600);
|
|
1219
1266
|
line-height: 1.3;
|
|
1220
1267
|
}
|
|
1221
1268
|
|
|
1269
|
+
/*
|
|
1270
|
+
* `--gridkit-font-size` may be relative to the parent (a preset sets
|
|
1271
|
+
* `0.875em`), so only the outermost forms element takes it: one inside
|
|
1272
|
+
* another keeps the size it inherits rather than shrinking it again, and
|
|
1273
|
+
* a section title inside a form scales from the form's size.
|
|
1274
|
+
*/
|
|
1275
|
+
:where(
|
|
1276
|
+
.gridkit-forms-form,
|
|
1277
|
+
.gridkit-forms-field,
|
|
1278
|
+
.gridkit-forms-text-input,
|
|
1279
|
+
.gridkit-forms-search-input,
|
|
1280
|
+
.gridkit-forms-message-summary
|
|
1281
|
+
)
|
|
1282
|
+
:is(
|
|
1283
|
+
.gridkit-forms-form,
|
|
1284
|
+
.gridkit-forms-field,
|
|
1285
|
+
.gridkit-forms-text-input,
|
|
1286
|
+
.gridkit-forms-search-input,
|
|
1287
|
+
.gridkit-forms-message-summary
|
|
1288
|
+
) {
|
|
1289
|
+
font-size: inherit;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.gridkit-forms-form .gridkit-forms-section-title {
|
|
1293
|
+
font-size: var(--gridkit-forms-section-title-font-size, 1.125em);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1222
1296
|
.gridkit-forms-message-summary-counts {
|
|
1223
1297
|
margin: 0;
|
|
1224
1298
|
font-size: var(--gridkit-hint-font-size);
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
--gridkit-selected-strong-dark: oklch(0.37 0.07 150);
|
|
33
33
|
--gridkit-header-bg-light: oklch(0.94 0 0);
|
|
34
34
|
--gridkit-header-bg-dark: oklch(0.27 0 0);
|
|
35
|
+
--gridkit-info-light: oklch(from var(--gridkit-accent-light) l c 250);
|
|
36
|
+
--gridkit-info-dark: oklch(from var(--gridkit-accent-dark) l c 250);
|
|
35
37
|
--gridkit-overlay-shadow-color-light: oklch(0 0 0 / 0.2);
|
|
36
38
|
--gridkit-overlay-shadow-color-dark: oklch(0 0 0 / 0.4);
|
|
37
39
|
|