-
Notifications
You must be signed in to change notification settings - Fork 77
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
CSS syntax highlighting for lit-element styles? #70
Comments
i find it very interesting that github markdown has highlighted the above |
Maybe not the answer you were waiting for, but if you include your styles in HTML the syntax highlighting will work: get styles() {
return html`
<style>
.system { display: flex; }
</style>
}` |
@wolojoli — hey that's a nice workaround :) since the @mjbvz — let us know if you have any advice on how we might implement this css-highlighting feature |
However lit-element says in https://lit-element.polymer-project.org/guide/styles#add-styles: "For optimal performance, define scoped styles in a static |
Another workaround if you are using Webpack is to put your styles in a separate file, then use raw-loader to bring them in as a string. This also has the advantage that you can use Sass or other preprocessors on the styles if you want. webpack.config.js:
whatever.ts:
|
I'm using lit-plugin, which does include css support. However, it seems to make Code lag noticeably more than when using lit-html, and I can't turn off certain unwanted warnings, so it would be good if lit-html could support css. |
Thanks for posting this! Intellisense for css is working as well. |
This can be easily supported by adding a file in Alternatively, one is able to patch the installed version of the extension (under |
✔️ i've found that the extension works great to bring syntax highlighting to my lit-html render blocks:
❓ however i was surprised that we don't have syntax highlighting for lit-element css styles
is there a way i can get the syntax highlighting for lit-element styles?
👋 cheers
The text was updated successfully, but these errors were encountered: