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

shadow-to-light should support lwc:dom=manual transformations for static stylesheets #28

Open
nolanlawson opened this issue Mar 4, 2024 · 0 comments

Comments

@nolanlawson
Copy link
Collaborator

We do some special transformations for lwc:dom=manual. However, these currently rely on detecting lwc:dom=manual in a component.html file and then applying it to the associated component.css file.

In the case of static stylesheets, the component JS could do something like:

import aHtml from './a.html'
import bHtml from './b.html'
import sheet from './sheet.css'

export default class extends LightningElement {
  static stylesheets = [sheet]

  render() {
    return someCondition ? aHtml : bHtml
  }
}

In this case, both a.html and b.html could contain their own lwc:dom=manual blocks, and sheet.css would ideally be able to support those.

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

No branches or pull requests

1 participant