Add attributes to<html>
See original GitHub issueIs your feature request related to a problem?
Sorry if feature exists, couldn’t find
Some popular css frameworks such as bulma, tailwind, are using <html class> like fixed-top
dark
etc…
it would be nice to send editable <html> from SSR.
Describe the solution you’d like
./src/root.tsx
Maybe something like this?
<QwikCity class="dark" data-q="test">
<head>
<meta charSet="utf-8" data-q="test"/>
<RouterHead />
</head>
<body lang="en">
<RouterOutlet />
<ServiceWorkerRegister />
</body>
</QwikCity>
Describe alternatives you’ve considered
Add extra props to QwikCity
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
HTML Attributes - W3Schools
HTML attributes provide additional information about HTML elements. ... The style attribute is used to add styles to an element, such as color,...
Read more >How to Add an Attribute to an HTML Tag - ThoughtCo
Learn how to add an attribute to an HTML tag. Attributes provide additional information to the web browser.
Read more >Element.setAttribute() - Web APIs | MDN
Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute...
Read more >How to add attribute to HTML element using javascript
First create the attribute and set the value. Then add it to the element.. var attr = document.createAttribute('step'); attr.value="any"; ...
Read more >How to add/update an attribute to an HTML element using ...
How to add/update an attribute to an HTML element using JavaScript? · Approach 1: We can use the inbuilt setAttribute() function of JavaScript....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes, it is part of our i18n prototype
just a sidenote:
so if you will provide a feature in the future (maybe when i18n is topic for qwik city?) to set it dynamically it would be very appreciated 🙏 (cc: @mhevery @adamdbradley @manucorporat )