clampography 2.0.0-beta.25 → 2.0.0-beta.26

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/src/forms.js CHANGED
@@ -205,10 +205,94 @@ export default (options = {}) => {
205
205
  "font-weight": "600",
206
206
  },
207
207
 
208
- // ── Meter & Progress ──────────────────────────────────────────────────────
209
- [scope(":where(meter, progress)")]: {
210
- "accent-color": "var(--clampography-primary)",
208
+ // ── Progress ──────────────────────────────────────────────────────────────
209
+ [scope("progress")]: {
210
+ "-webkit-appearance": "none",
211
+ "appearance": "none",
211
212
  "width": "100%",
213
+ "height": "1em",
214
+ "background": "transparent",
212
215
  },
216
+
217
+ // WebKit progress track
218
+ [scope("progress::-webkit-progress-bar")]: {
219
+ "background": "color-mix(in oklab, var(--clampography-text) 20%, transparent)",
220
+ },
221
+
222
+ // WebKit progress value
223
+ [scope("progress::-webkit-progress-value")]: {
224
+ "background": "var(--clampography-success)",
225
+ },
226
+
227
+ // Firefox progress value
228
+ [scope("progress::-moz-progress-bar")]: {
229
+ "background": "var(--clampography-success)",
230
+ },
231
+
232
+ // ── Meter ─────────────────────────────────────────────────────────────────
233
+ // Custom styling for <meter> (accent-color does not work on meter)
234
+ [scope("meter")]: {
235
+ "-webkit-appearance": "none",
236
+ "appearance": "none",
237
+ "width": "100%",
238
+ "height": "1em",
239
+ "background": "transparent",
240
+ },
241
+
242
+ // Firefox track (restored via Firefox-only feature query)
243
+ // @supports (-moz-appearance: none) is ignored by all WebKit/Blink browsers
244
+ "@supports (-moz-appearance: none)": {
245
+ [scope("progress")]: {
246
+ "background": "color-mix(in oklab, var(--clampography-text) 20%, transparent)",
247
+ },
248
+ [scope("meter")]: {
249
+ "background": "color-mix(in oklab, var(--clampography-text) 20%, transparent)",
250
+ },
251
+ },
252
+
253
+ // Re-establish height context for WebKit shadow DOM
254
+ // appearance:none breaks Chrome's flex layout; inner elements can't resolve height:100%
255
+ // without a concrete parent height set here.
256
+ // display:flex + align-items:stretch forces the child bar to fill the full height
257
+ // without top-anchoring it the way display:block would.
258
+ [scope("meter::-webkit-meter-inner-element")]: {
259
+ "display": "flex",
260
+ "align-items": "stretch",
261
+ "height": "1em",
262
+ },
263
+
264
+ // WebKit inner track
265
+ [scope("meter::-webkit-meter-bar")]: {
266
+ "background": "color-mix(in oklab, var(--clampography-text) 20%, transparent)",
267
+ "height": "100%",
268
+ },
269
+
270
+ // 1. Optimum (Success)
271
+ [scope("meter::-webkit-meter-optimum-value")]: {
272
+ "background": "var(--clampography-success)",
273
+ "height": "100%",
274
+ },
275
+ [scope("meter:-moz-meter-optimum::-moz-meter-bar")]: {
276
+ "background": "var(--clampography-success)",
277
+ },
278
+
279
+ // 2. Sub-optimum (Warning)
280
+ [scope("meter::-webkit-meter-suboptimum-value")]: {
281
+ "background": "var(--clampography-warning)",
282
+ "height": "100%",
283
+ },
284
+ [scope("meter:-moz-meter-sub-optimum::-moz-meter-bar")]: {
285
+ "background": "var(--clampography-warning)",
286
+ },
287
+
288
+ // 3. Even less good (Error)
289
+ [scope("meter::-webkit-meter-even-less-good-value")]: {
290
+ "background": "var(--clampography-error)",
291
+ "height": "100%",
292
+ },
293
+ [scope("meter:-moz-meter-sub-sub-optimum::-moz-meter-bar")]: {
294
+ "background": "var(--clampography-error)",
295
+ },
296
+
213
297
  };
214
298
  };
package/src/kbd.js CHANGED
@@ -44,7 +44,7 @@ export default (options = {}) => {
44
44
  [scope("kbd")]: {
45
45
  "display": "inline-block",
46
46
  "padding": "0.1em 0.45em",
47
- "min-width": "1.6em",
47
+ "min-width": "2em",
48
48
  "text-align": "center",
49
49
  "font-size": "0.8em",
50
50
  "font-weight": "700",