-
Notifications
You must be signed in to change notification settings - Fork 393
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
feat: add flag to render legacy CSS scope tokens #3734
Conversation
return (this as any)[KEY__LEGACY_SHADOW_TOKEN_PRIVATE]; | ||
}, | ||
configurable: true, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is largely copypasta from shadow-token.ts
, but I'm hoping we can just remove it eventually. So creating an abstraction would have just made it harder to remove in the future.
/nucleus test |
1 similar comment
/nucleus test |
/nucleus ignore --reason 'nucleus is having issues, webruntime has brittle snapshot tests' |
packages/@lwc/integration-karma/test/rendering/legacy-scope-tokens/index.spec.js
Show resolved
Hide resolved
/nucleus ignore --reason 'broken downstreams are gone now' |
Details
Adds a runtime flag that, when enabled, renders the legacy CSS attributes/classes in addition to the new ones.
The reason for rendering both is that we still want the SVG static perf optimization, but some folks need the flag enabled to support legacy global stylesheets.
The reason for a runtime flag is because we can't vary the output of the compiler on the flag, so the check must be done entirely at runtime. To accomplish this, we output the compiled template with both tokens, e.g.:
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item
W-14181175