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
As observed in ProjectEvergreen/greenwood#752 (comment), noticed that with Lit 2.0 had some unexpected behaviors when pre-rendering components that used expressions inside a render method, ex.
For the pre-rendering use case, it looked like Lit was omitting the wrapping <style> tags leaving just the CSS as plain text / HTML, which is visible on the page briefly until JS / Shadow DOM kicks in.
Proposal
For any component that follows the above pattern, I suggest adopting this pattern instead when wanting to use CSS-in-JS approach
Overview
As observed in ProjectEvergreen/greenwood#752 (comment), noticed that with Lit 2.0 had some unexpected behaviors when pre-rendering components that used expressions inside a render method, ex.
For the pre-rendering use case, it looked like Lit was omitting the wrapping
<style>
tags leaving just the CSS as plain text / HTML, which is visible on the page briefly until JS / Shadow DOM kicks in.Proposal
For any component that follows the above pattern, I suggest adopting this pattern instead when wanting to use CSS-in-JS approach
The text was updated successfully, but these errors were encountered: