Skip to content

feat: add config.htmlAttributes#51

Merged
andresilva-cc merged 2 commits intomainfrom
feat-html-attributes
Apr 5, 2026
Merged

feat: add config.htmlAttributes#51
andresilva-cc merged 2 commits intomainfrom
feat-html-attributes

Conversation

@andresilva-cc
Copy link
Copy Markdown
Contributor

Summary

  • New config.htmlAttributes field — sets attributes on the root <html> element (e.g. lang, dir, data-theme)
  • Attribute keys validated against /^[a-zA-Z][a-zA-Z0-9\-_:.]*$/ to prevent HTML injection
  • Variant support with spread-merge semantics (variant keys win, base keys preserved)
  • Updated Compositions and API docs on the website
  • Updated README with htmlAttributes example

Test plan

  • Unit tests for key validation, escaping, rendering, variant merge
  • Integration tests confirming attributes reach the browser and produce valid output
  • 325 tests passing

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grafex Ready Ready Preview, Comment Apr 5, 2026 2:52am

@andresilva-cc andresilva-cc merged commit 322b12b into main Apr 5, 2026
5 checks passed
@andresilva-cc andresilva-cc deleted the feat-html-attributes branch April 5, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant