@stacksjs/ts-css 0.3.27 → 0.3.28

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.
@@ -0,0 +1,24 @@
1
+ /** The same declarations as a CSS block body, for the forms preflight. */
2
+ export declare function selectCaretCSS(indent?: string): string;
3
+ /**
4
+ * The caret a single-line `<select>` draws, in the text's own colour.
5
+ *
6
+ * It used to be an SVG in a data URI with the stroke written in as `#6b7280`.
7
+ * A data URI is a separate document: it cannot read `currentColor` or a custom
8
+ * property, so on any palette that was not grey-on-white the arrow was the one
9
+ * part of the control that did not match, and an app with light and dark themes
10
+ * had to restate the whole background per theme (stacksjs/ts-css#45).
11
+ *
12
+ * Two gradients can read `currentColor` where the URI cannot. Each paints half
13
+ * of a square tile, and the two tiles side by side make the caret, so it takes
14
+ * the select's `color` under any theme mechanism with nothing to override.
15
+ *
16
+ * A mask does not work here, though it looks like the obvious tool: a mask on
17
+ * a `<select>` clips the WHOLE control, and a `<select>` does not reliably
18
+ * render `::after` to carry one instead.
19
+ *
20
+ * Sized in em, so the caret and the room kept for it scale with the select's
21
+ * own font: a compact 13px picker gets a smaller arrow, closer in, than a 16px
22
+ * field, rather than one fixed size that crowds the small one.
23
+ */
24
+ export declare const SELECT_CARET: Readonly<Record<string, string>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ts-css",
3
3
  "type": "module",
4
- "version": "0.3.27",
4
+ "version": "0.3.28",
5
5
  "description": "Pure-TypeScript CSS toolkit and utility-first CSS engine for Bun/Node — parser, walker, generator, selector engine, minifier, and a Tailwind-compatible utility engine. Zero runtime deps.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",