Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ssr): add more stylesheet fixtures #4566

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Conversation

nolanlawson
Copy link
Contributor

Details

This is setting up some work I'm doing to make stylesheets / stylesheet scope tokens work in the new SSR compiler.

This just adds some tests to assert how the existing @lwc/engine-server behaves.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

@nolanlawson nolanlawson requested a review from a team as a code owner September 19, 2024 23:56
static renderMode = 'light';

render() {
return template;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asserting that we understand that scoped styles are associated with this template which is returned dynamically from the render function.

</style>
<style class="lwc-1rssj1tib70" type="text/css">
:dir(ltr) {margin-right: 0;}:host {color: blue;}
</style>
Copy link
Contributor Author

@nolanlawson nolanlawson Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always :host and :dir() in shadow DOM because we don't support synthetic shadow.

</style>
<style class="lwc-1rssj1tib70" type="text/css">
:dir(ltr) {margin-right: 0;}.lwc-1rssj1tib70-host {color: blue;}
</style>
Copy link
Contributor Author

@nolanlawson nolanlawson Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always :dir() because we don't support synthetic shadow, but light DOM gets the "fake" :host when using scoped styles only.

@nolanlawson nolanlawson merged commit f6b22cb into master Sep 20, 2024
11 checks passed
@nolanlawson nolanlawson deleted the nolan/ssr-style-tests branch September 20, 2024 16:41
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.

None yet

2 participants