@usereq/widget 0.2.17 → 0.2.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usereq/widget",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,6 +1,24 @@
1
1
  export const WIDGET_SHADOW_THEME_CSS = `
2
2
  :host {
3
3
  color-scheme: light;
4
+ /*
5
+ * Anchor inherited typography to the design system.
6
+ *
7
+ * Shadow DOM isolates SELECTORS but NOT inherited properties — the
8
+ * <usereq-agent-widget> custom element inherits color / font-family /
9
+ * font-size / line-height from the host page's <body>, and form
10
+ * controls inside (textarea, input, button) re-inherit via Tailwind's
11
+ * preflight rule \`color: inherit\`. If the host page sets
12
+ * \`body { color: #fff }\` the widget's textarea becomes invisible.
13
+ *
14
+ * Setting these here makes :host the canonical source so every
15
+ * descendant inside the shadow tree uses our tokens regardless of
16
+ * what the host page is doing.
17
+ */
18
+ color: var(--foreground);
19
+ font-family: var(--font-geist-sans), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
20
+ font-size: 16px;
21
+ line-height: 1.5;
4
22
  --tw-border-style: solid;
5
23
  --radius: 0.625rem;
6
24
  --font-geist-sans: Geist, sans-serif;