@gridkitjs/theme-css 0.0.0-dev-20261126182315 → 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 +49 -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.
|