You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rendering a page from an .html files results in a different HTML output than rendering a page from an .mjs template file with that doesn't use the store.
Problem
The problem is that this makes for an inconsistent author experience and complicates page level styling as there is an extra layer that is sometimes there that they then may or may not have to deal with.
// pages/test.mjsexportdefaultfunctiontest(){returnhtml`<h1>This is a title</h1> `;}
Results in:
<body><page-test><h1>This is a title</h1></page-test></body>
Rendering from .html
<!-- pages/test.html -->
<h1>This is a title</h1>
Results in:
<body><h1>This is a title</h1></body>
Desired situation
At the very least, both situations should result in the same output so authors have a predictable output where they can apply styling to.
The most desired situation is that .mjs files are rendered like the .html files without the wrapper element so the framework is as little in the way as possible and authors can decide if they want a wrapper element, and if so what its signature is.
If a wrapper element is needed, changing the signature from <page-test> to something like <enhance-page route="test"> is preferable. That way there is a predictable element name that can be targeted with CSS and is easier queryable for folks that want JS access for some reason.
The text was updated successfully, but these errors were encountered:
Rendering a page from an
.html
files results in a different HTML output than rendering a page from an.mjs
template file with that doesn't use the store.Problem
The problem is that this makes for an inconsistent author experience and complicates page level styling as there is an extra layer that is sometimes there that they then may or may not have to deal with.
Current situation
Rendering from
.mjs
Results in:
Rendering from
.html
Results in:
Desired situation
At the very least, both situations should result in the same output so authors have a predictable output where they can apply styling to.
The most desired situation is that
.mjs
files are rendered like the.html
files without the wrapper element so the framework is as little in the way as possible and authors can decide if they want a wrapper element, and if so what its signature is.If a wrapper element is needed, changing the signature from
<page-test>
to something like<enhance-page route="test">
is preferable. That way there is a predictable element name that can be targeted with CSS and is easier queryable for folks that want JS access for some reason.The text was updated successfully, but these errors were encountered: