Conversation
This was referenced Sep 18, 2026
nitedani
force-pushed
the
claude/tag-attributes-precedence-ljv9nc
branch
from
September 18, 2026 14:59
38b2e07 to
42eac6c
Compare
nitedani
force-pushed
the
claude/html-tags-attributes-setting-ljv9nc
branch
from
September 18, 2026 14:59
d03012f to
4ba27ac
Compare
…over the ones set by Vike extensions For cumulative settings, `getHeadSetting()` returned the values in the order Vike provides them (most specific value first, values set by Vike extensions last) followed by the values set by `useConfig()`, and the tag attributes were merged in that order with the last value winning upon conflict. Consequently, upon conflict, a value set by a Vike extension would override the app's value, and a value set by `+config.js` would override the value set by `+htmlAttributes.js`. `getHeadSetting()` now returns the values of cumulative settings sorted by increasing precedence (values set by Vike extensions first, the app's most specific value last, then the values set by `useConfig()`), so that merging them in order yields the value with the highest precedence. Values set by `useConfig()` keep the highest precedence. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdJwhUKSfXPVuSvXyxBpr7
Adds attributes to the root element `<div id="root">`, e.g. `rootAttributes: { role: 'none' }`.
Same semantics as `+htmlAttributes` and `+bodyAttributes`: server-only (not re-applied upon client-side navigation), global, cumulative (for Vike extensions, the app's values taking precedence), value or `(pageContext) => value`, and settable via `useConfig()`.
The `id` attribute isn't validated: overriding it is the user's responsibility.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MdJwhUKSfXPVuSvXyxBpr7
nitedani
force-pushed
the
claude/tag-attributes-precedence-ljv9nc
branch
from
September 19, 2026 07:10
42eac6c to
5efce2f
Compare
nitedani
force-pushed
the
claude/html-tags-attributes-setting-ljv9nc
branch
from
September 19, 2026 07:10
4ba27ac to
c8e5d10
Compare
Base automatically changed from
claude/tag-attributes-precedence-ljv9nc
to
main
September 19, 2026 07:30
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdJwhUKSfXPVuSvXyxBpr7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
+rootAttributessetting requested in vikejs/vike#3513: it adds attributes to the root element<div id="root">.Semantics
Same as
+htmlAttributesand+bodyAttributes:global: trueandcumulative: true: Vike extensions can add attributes; upon conflict the app's value wins (see fix: let the app's htmlAttributes/bodyAttributes take precedence over the ones set by Vike extensions #228).(pageContext) => object.useConfig({ rootAttributes }).No default value: the root element stays
<div id="root">unless the app sets something. Theidattribute isn't validated: overriding it is the user's responsibility (hydration then fails).Related
main.🤖 Generated with Claude Code
https://claude.ai/code/session_01MdJwhUKSfXPVuSvXyxBpr7