@gridkitjs/theme-css 0.0.0-dev-20261118111459 → 0.0.0-dev-20261118115237

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/styles.css +87 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridkitjs/theme-css",
3
- "version": "0.0.0-dev-20261118111459",
3
+ "version": "0.0.0-dev-20261118115237",
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/styles.css CHANGED
@@ -751,6 +751,93 @@
751
751
  );
752
752
  }
753
753
 
754
+ /*
755
+ * A screen that cannot hover never brings the header's toggles out, so
756
+ * there they show at rest, still told apart by colour and fill once the
757
+ * column is sorted, filtered or grouped.
758
+ */
759
+ @media (hover: none) {
760
+ .gridkit-data-grid
761
+ .gridkit-header-sort-toggle:not(.is-sorted-asc):not(.is-sorted-desc),
762
+ .gridkit-data-grid .gridkit-header-filter-toggle:not(.is-filtered),
763
+ .gridkit-data-grid .gridkit-header-group-toggle:not(.is-grouped) {
764
+ opacity: 1;
765
+ }
766
+ }
767
+
768
+ /*
769
+ * A finger needs 24 by 24 pixels to land on, WCAG 2.2's minimum target.
770
+ * Each toggle grows its box by padding around an unchanged icon, and the
771
+ * ones docked to the inline end move inward to sit side by side, clear of
772
+ * the resize handle, which widens to the same 24 pixels. The handle draws
773
+ * nothing of its own, so the line a resize colours stays on the column's
774
+ * edge.
775
+ */
776
+ @media (pointer: coarse) {
777
+ .gridkit-data-grid .gridkit-header-resize-handle {
778
+ width: 24px;
779
+ }
780
+
781
+ .gridkit-data-grid .gridkit-header-sort-toggle,
782
+ .gridkit-data-grid .gridkit-header-filter-toggle,
783
+ .gridkit-data-grid .gridkit-header-group-toggle {
784
+ box-sizing: border-box;
785
+ min-width: 24px;
786
+ min-height: 24px;
787
+ justify-content: center;
788
+ padding: max(0px, calc((24px - var(--gridkit-header-icon-size)) / 2));
789
+ }
790
+
791
+ .gridkit-data-grid .gridkit-header-sort-toggle,
792
+ .gridkit-data-grid .gridkit-header-filter-toggle {
793
+ inset-inline-end: 24px;
794
+ }
795
+
796
+ .gridkit-data-grid
797
+ .gridkit-header-cell:has(> .gridkit-header-filter-toggle)
798
+ .gridkit-header-sort-toggle {
799
+ inset-inline-end: 48px;
800
+ }
801
+
802
+ /*
803
+ * A touch screen shows the docked toggles at rest, where they would sit
804
+ * over the label, so the label keeps clear of them and is cut short
805
+ * instead.
806
+ */
807
+ .gridkit-data-grid
808
+ .gridkit-grid-header
809
+ .gridkit-header-cell:has(> .gridkit-header-sort-toggle),
810
+ .gridkit-data-grid
811
+ .gridkit-grid-header
812
+ .gridkit-header-cell:has(> .gridkit-header-filter-toggle) {
813
+ padding-inline-end: 48px;
814
+ }
815
+
816
+ .gridkit-data-grid
817
+ .gridkit-grid-header
818
+ .gridkit-header-cell:has(> .gridkit-header-sort-toggle):has(
819
+ > .gridkit-header-filter-toggle
820
+ ) {
821
+ padding-inline-end: 72px;
822
+ }
823
+
824
+ /* Grown into the header's padding, so the label stays where it was. */
825
+ .gridkit-data-grid .gridkit-header-group-toggle {
826
+ margin-block: min(
827
+ 0px,
828
+ calc((var(--gridkit-header-icon-size) - 24px) / 2)
829
+ );
830
+ margin-inline-start: min(
831
+ 0px,
832
+ calc((var(--gridkit-header-icon-size) - 24px) / 2)
833
+ );
834
+ margin-inline-end: calc(
835
+ var(--gridkit-spacing) * 1.5 +
836
+ min(0px, calc((var(--gridkit-header-icon-size) - 24px) / 2))
837
+ );
838
+ }
839
+ }
840
+
754
841
  .gridkit-data-grid .gridkit-grid-cell {
755
842
  padding: var(--gridkit-cell-padding-y) var(--gridkit-cell-padding-x);
756
843
  }