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/dist/cdn.js +5 -6
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles.css +12 -4
package/package.json
CHANGED
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
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
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
|
|