@pretable/ui 0.3.0 → 0.3.1
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/dist/grid.css +29 -9
- package/dist/themes/excel.css +7 -0
- package/dist/themes/material.css +6 -0
- package/package.json +1 -1
package/dist/grid.css
CHANGED
|
@@ -28,6 +28,22 @@
|
|
|
28
28
|
border: 0;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/* Every glyph in the set draws on a 16px grid in currentColor and takes its
|
|
32
|
+
size from here, so one token moves all of them. `flex: none` because most
|
|
33
|
+
sit inside flex containers that would otherwise squash them.
|
|
34
|
+
|
|
35
|
+
The literal fallback is load-bearing, for the same reason as
|
|
36
|
+
--pretable-group-indent below: an SVG with a viewBox and no width has no
|
|
37
|
+
useful intrinsic size, so against a third-party theme that predates the
|
|
38
|
+
token these collapse to `width: auto` and the chip grip alone inflates
|
|
39
|
+
from 16px to 54px, taking the drag-to-group strip's height with it. 16px
|
|
40
|
+
because that is the grid the set is authored on. */
|
|
41
|
+
:where([data-pretable-icon]) {
|
|
42
|
+
flex: none;
|
|
43
|
+
width: var(--pretable-icon-size, 16px);
|
|
44
|
+
height: var(--pretable-icon-size, 16px);
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
/* Outer viewport (scrollable container) */
|
|
32
48
|
:where([data-pretable-scroll-viewport]) {
|
|
33
49
|
background: var(--pretable-bg-grid);
|
|
@@ -147,10 +163,17 @@
|
|
|
147
163
|
);
|
|
148
164
|
}
|
|
149
165
|
|
|
166
|
+
/* Sized from the icon token rather than 1em: the twisty is an SVG now, so a
|
|
167
|
+
font-relative box no longer tracks the glyph inside it. `rotate` below
|
|
168
|
+
turns about the BUTTON's centre, so the box has to hug the glyph or the
|
|
169
|
+
collapsed chevron swings off its own axis. */
|
|
150
170
|
:where([data-pretable-group-twisty]) {
|
|
151
171
|
flex: none;
|
|
152
|
-
|
|
153
|
-
|
|
172
|
+
display: inline-flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
width: var(--pretable-icon-size, 16px);
|
|
176
|
+
height: var(--pretable-icon-size, 16px);
|
|
154
177
|
padding: 0;
|
|
155
178
|
border: 0;
|
|
156
179
|
background: none;
|
|
@@ -612,14 +635,11 @@
|
|
|
612
635
|
cursor: grabbing;
|
|
613
636
|
}
|
|
614
637
|
|
|
615
|
-
/*
|
|
616
|
-
|
|
638
|
+
/* The grip is a GripIcon from the set, so its size comes from
|
|
639
|
+
--pretable-icon-size via [data-pretable-icon] and only the tint is left
|
|
640
|
+
here. It used to be a tiled radial-gradient on an empty span, which could
|
|
641
|
+
not share a weight or an optical size with any other glyph. */
|
|
617
642
|
:where([data-pretable-chip-handle]) {
|
|
618
|
-
flex: none;
|
|
619
|
-
width: 5px;
|
|
620
|
-
height: 12px;
|
|
621
|
-
background-image: radial-gradient(currentColor 40%, transparent 45%);
|
|
622
|
-
background-size: 3px 4px;
|
|
623
643
|
color: var(--pretable-text-dim);
|
|
624
644
|
}
|
|
625
645
|
|
package/dist/themes/excel.css
CHANGED
|
@@ -84,6 +84,13 @@
|
|
|
84
84
|
--pretable-font-size-cell: 15px; /* Aptos Narrow 11pt */
|
|
85
85
|
--pretable-font-size-header: 13px;
|
|
86
86
|
|
|
87
|
+
/* Every glyph in the icon set draws at this size. 12px because Excel is a
|
|
88
|
+
dense skin — its header runs 13px and its row 20px, so a 16px glyph would
|
|
89
|
+
out-weigh the label it sits beside. Deliberately not density-scoped: the
|
|
90
|
+
chrome glyphs are affordances, not text, and they stay legible at 12px in
|
|
91
|
+
every tier. */
|
|
92
|
+
--pretable-icon-size: 12px;
|
|
93
|
+
|
|
87
94
|
/* Typography */
|
|
88
95
|
--pretable-font-sans:
|
|
89
96
|
"Aptos Narrow", "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont,
|
package/dist/themes/material.css
CHANGED
|
@@ -91,6 +91,12 @@
|
|
|
91
91
|
--pretable-font-size-cell: 14px; /* body-medium */
|
|
92
92
|
--pretable-font-size-header: 14px; /* label-large (px equal; weight differs in grid.css) */
|
|
93
93
|
|
|
94
|
+
/* Every glyph in the icon set draws at this size. 16px is M3's own icon size
|
|
95
|
+
for dense components, and it matches the 14px header and 48px row far
|
|
96
|
+
better than Excel's 12px would. Deliberately not density-scoped: the
|
|
97
|
+
chrome glyphs are affordances, not text. */
|
|
98
|
+
--pretable-icon-size: 16px;
|
|
99
|
+
|
|
94
100
|
/* Typography */
|
|
95
101
|
--pretable-font-sans:
|
|
96
102
|
"Roboto Flex", "Roboto", system-ui, -apple-system, BlinkMacSystemFont,
|