From ac8845cc353d6105a2f65e4a76d688422cd08781 Mon Sep 17 00:00:00 2001 From: Tito Date: Mon, 23 Mar 2026 06:52:43 -0300 Subject: [PATCH 1/4] improve default to properties DOM docs, add xmlns requirement for partials --- documentation/solid-2.0/07-dom.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/solid-2.0/07-dom.md b/documentation/solid-2.0/07-dom.md index bc3a9575..85349c20 100644 --- a/documentation/solid-2.0/07-dom.md +++ b/documentation/solid-2.0/07-dom.md @@ -18,8 +18,9 @@ DOM behavior in Solid 2.0 follows HTML standards by default: attributes over pro - **Attributes over properties:** Prefer setting attributes rather than properties in almost all cases. Aligns with web components and SSR. - **Lowercasing:** Use HTML lowercase for built-in attribute names (no camelCase for attributes). Exceptions: - **Event handlers** remain camelCase (e.g. `onClick`) to keep the `on` modifier clear. - - **Default attributes** such as `value`, `selected`, `checked`, `muted` continue to be handled as props where that avoids confusion. + - **Default to properties** such as `input.value`, `input.checked`, `select.value`, `option.value`, `option.selected`, `video/audio.muted` continue to be handled as props where that avoids confusion. However, attribute/property can still be used as `` - **Namespaces:** `attr:` and `bool:` namespaces are removed; the single standard behavior makes the model consistent. +- **XML Namespaces:** `svg` and `math` work as expected, however when using XML partials, an `xmlns` attribute is required for the browser to create the elements with the correct namespace. ### Enhanced class prop @@ -129,4 +130,4 @@ Used as: ## Open questions -- Exact list of "default" props that stay as props (`value`, `selected`, `checked`, `muted`, …). +- Exact list of "default" props that stay as props (`input.value`, `input.checked`, `select.value`, `option.value`, `option.selected`, `video/audio.muted`, …). Generally, stateful DOM properties should be considered on this list. From 0b7e9687d16d672d2aa6bddc2161c5a1cf5a35c5 Mon Sep 17 00:00:00 2001 From: Tito Date: Mon, 23 Mar 2026 07:31:56 -0300 Subject: [PATCH 2/4] remove unrelated entries from table --- documentation/solid-2.0/07-dom.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/documentation/solid-2.0/07-dom.md b/documentation/solid-2.0/07-dom.md index 85349c20..04a7223b 100644 --- a/documentation/solid-2.0/07-dom.md +++ b/documentation/solid-2.0/07-dom.md @@ -118,8 +118,6 @@ Used as: | `oncapture:` | Removed (replacement pattern TBD / use native event options where applicable) | | `attr:` / `bool:` namespaces | Single attribute/property model above | | `use:` directives | Use `ref` callbacks / directive factories (`ref={directive(opts)}`); arrays compose (`ref={[a, b]}`) | -| `createMutable` (from Solid primitives) | Moved to / available from `@solidjs/signals` or primitives layer | -| `scheduler` / `createDeferred` | Moved to primitives; use primitives API | `@solidjs/legacy` can provide compatibility for deprecated DOM APIs where feasible. From d5ae8d3946530e12175c587821b9ea60a5c29344 Mon Sep 17 00:00:00 2001 From: Tito Date: Mon, 23 Mar 2026 21:48:54 -0300 Subject: [PATCH 3/4] clarify that xmlns is added automatically when possible --- documentation/solid-2.0/07-dom.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/solid-2.0/07-dom.md b/documentation/solid-2.0/07-dom.md index 04a7223b..731cdd7a 100644 --- a/documentation/solid-2.0/07-dom.md +++ b/documentation/solid-2.0/07-dom.md @@ -20,8 +20,8 @@ DOM behavior in Solid 2.0 follows HTML standards by default: attributes over pro - **Event handlers** remain camelCase (e.g. `onClick`) to keep the `on` modifier clear. - **Default to properties** such as `input.value`, `input.checked`, `select.value`, `option.value`, `option.selected`, `video/audio.muted` continue to be handled as props where that avoids confusion. However, attribute/property can still be used as `` - **Namespaces:** `attr:` and `bool:` namespaces are removed; the single standard behavior makes the model consistent. -- **XML Namespaces:** `svg` and `math` work as expected, however when using XML partials, an `xmlns` attribute is required for the browser to create the elements with the correct namespace. - +- **XML Namespaces:** `svg` and `math` work as expected, however when using XML partials, an `xmlns` attribute is required for the browser to create the elements with the correct namespace. Solid adds these automatically to the tags that can recognize as SVG/MathML. For example an `a` tag returned from a partial to be used in XML need `xmlns` added by the user. + ### Enhanced class prop - **`classList` is removed;** its behavior is merged into `class`. From 40be8a74dec6b9fb0a9ab49dc83b65782eb8d6db Mon Sep 17 00:00:00 2001 From: Tito Date: Mon, 23 Mar 2026 21:59:49 -0300 Subject: [PATCH 4/4] make more clear we default to atrributes now --- documentation/solid-2.0/07-dom.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/solid-2.0/07-dom.md b/documentation/solid-2.0/07-dom.md index 731cdd7a..b2ede7b9 100644 --- a/documentation/solid-2.0/07-dom.md +++ b/documentation/solid-2.0/07-dom.md @@ -18,7 +18,7 @@ DOM behavior in Solid 2.0 follows HTML standards by default: attributes over pro - **Attributes over properties:** Prefer setting attributes rather than properties in almost all cases. Aligns with web components and SSR. - **Lowercasing:** Use HTML lowercase for built-in attribute names (no camelCase for attributes). Exceptions: - **Event handlers** remain camelCase (e.g. `onClick`) to keep the `on` modifier clear. - - **Default to properties** such as `input.value`, `input.checked`, `select.value`, `option.value`, `option.selected`, `video/audio.muted` continue to be handled as props where that avoids confusion. However, attribute/property can still be used as `` + - **Default to attributes** But attributes such as `input.value`, `input.checked`, `select.value`, `option.value`, `option.selected`, `video/audio.muted` continue to be handled as props where that avoids confusion. However, attribute/property can still be used as `` - **Namespaces:** `attr:` and `bool:` namespaces are removed; the single standard behavior makes the model consistent. - **XML Namespaces:** `svg` and `math` work as expected, however when using XML partials, an `xmlns` attribute is required for the browser to create the elements with the correct namespace. Solid adds these automatically to the tags that can recognize as SVG/MathML. For example an `a` tag returned from a partial to be used in XML need `xmlns` added by the user.