Commit 1a07523
fix(16): solid lower static style="..." to object form (mirror react)
ITEM-1-RESIDUAL partial closure. Static `style="k: v"` HTML attributes now
lower to JSX `style={{k: v}}` object form on the Solid target, mirroring
the existing React path. The bug class: when a child component is invoked
with a string-form `style="..."` attribute and the child auto-forwards
via `{...attrs}`, Solid's dom-expressions `style()` helper routed the
string value through `nodeStyle.cssText = value` which REPLACES the entire
inline style — wiping any wrapper-set `style={{...}}` defaults. With the
object-form lowering the child receives an object, Solid iterates and
`setProperty`-per-key, MERGING with the wrapper's defaults instead.
Net effect on the ThemedButtonConsumer · solid matrix VR cell: unchanged
at 3 108 px diff. The wrapper's `--btn-fg: #ffffff` was already rendering
white via the CSS `var(--btn-fg, #fff)` fallback, so this fix moves no
visible pixels. Still worth landing — future engine wrappers that depend
on the precise inline-style cascade (rather than CSS-var fallback) now
work correctly on Solid, matching React.
Files:
- packages/targets/solid/src/emit/emitTemplateAttribute.ts —
refactored `lowerStringLiteralStyle` to take `(sourceLoc, literal)`
(mirror react sibling) and added the bare-`style="..."` static path
next to the existing `:style="'literal'"` binding-path call site
- tests/dist-parity/fixtures/ThemedButtonConsumer.solid.tsx — rebless
(sole consumer of static `style="..."` in the dist-parity slate)
- matrix.spec.ts PHASE_14_1_FOLLOWUP comment — updated to reflect the
closure attempt + remaining ~20 px width residual (unaffected by this
fix; ruled out the style-clobber theory)
Verification:
- turbo run typecheck --force --continue: 47/47 green
- turbo run test --continue: 46/46 green (target-solid 188/188,
dist-parity 512/512)
- tools/ci-repro/vr.sh -g ThemedButtonConsumer.*solid: cell still
fails at 3 108 px (gated); themed-button × solid DOM-assertion
cells remain green
- Full VR matrix (cached run): 241 passed / 13 skipped / 0 failed
— no new regressions
The remaining 20 px width drift is a different, narrower issue. Carried
into a separate post-Phase-16 investigation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 14508e6 commit 1a07523
3 files changed
Lines changed: 51 additions & 20 deletions
File tree
- packages/targets/solid/src/emit
- tests
- dist-parity/fixtures
- visual-regression/specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
478 | 496 | | |
479 | 497 | | |
480 | 498 | | |
| |||
493 | 511 | | |
494 | 512 | | |
495 | 513 | | |
496 | | - | |
| 514 | + | |
497 | 515 | | |
498 | 516 | | |
499 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
390 | 403 | | |
391 | 404 | | |
392 | 405 | | |
| |||
0 commit comments