monowind 0.2.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monowind",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Text-based user interfaces (TUI) on the web, from ordinary HTML and Tailwind utility classes",
5
5
  "keywords": [
6
6
  "ascii",
package/src/styles.css CHANGED
@@ -159,12 +159,19 @@ mono-wind:not([data-mw-ready]) {
159
159
  visibility: hidden !important;
160
160
  }
161
161
 
162
- /* Full invert on selection. Both fields spelled out setting only
163
- * `color` makes some engines drop the OS default background. Native
164
- * copy still yields the real text (the DOM the browser reads). The
165
- * shadow grid mirrors this rule inside element.ts. */
162
+ /* Full invert on selection THE CANONICAL RULE; shadow scopes can't
163
+ * share it, so it's restated in element.ts (the grid) and in
164
+ * @monowind/ascii's transcript: update all three together. Both
165
+ * fields spelled out setting only `color` makes some engines drop
166
+ * the OS default background. The text-shadow is the ink in Safari:
167
+ * it paints selection text with the element's text-fill-color — which
168
+ * the invisibility lock holds transparent — so a zero-offset shadow
169
+ * draws the glyph copy that `color` draws in other engines (where the
170
+ * identical-color shadow hides beneath it). Native copy still yields
171
+ * the real text (the DOM the browser reads). */
166
172
  mono-wind:not([measuring]) *::selection {
167
173
  color: var(--mw-bg, canvas) !important;
174
+ text-shadow: 0 0 0 var(--mw-bg, canvas) !important;
168
175
  background: var(--mw-fg, canvastext) !important;
169
176
  }
170
177
  /* Focus-invert already flipped the element's colors, so re-flipping in
@@ -172,6 +179,7 @@ mono-wind:not([measuring]) *::selection {
172
179
  * the selection. Swap them back for the focused element. */
173
180
  mono-wind:not([measuring]) :focus-visible::selection {
174
181
  color: var(--mw-fg, canvastext) !important;
182
+ text-shadow: 0 0 0 var(--mw-fg, canvastext) !important;
175
183
  background: var(--mw-bg, canvas) !important;
176
184
  }
177
185