question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete and syntax highlighting for style attributes

See original GitHub issue

Coming from React/JSX, you could get the list of CSS properties within the style property/attribute and have syntax highlighting.

It uses object notation instead of a string, although this surprising this still shows up within a Svelte component (albeit not supported). I figure due to the use of svelte2tsx

image

image

It would be useful if the same was supported within Svelte when using the style attribute (string).

image

image

It would also be helpful if the expressions within the values were highlighted as such (and not just shown as one big string).

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Monkatrazcommented, Feb 25, 2021

Adding syntax highlighting inside of style strings was something I added but it was removed when it had a few issues. I don’t know how the TSX grammar handles it - it’s probably something goofy, like writing their own CSS syntax highlighting for just style strings.

Right now there is a hesitation to add further syntax highlighting without a test suite, but otherwise I’d be willing to experiment with this.

1reaction
dummdidummcommented, Aug 26, 2020

The syntax highlighting part where moustache tags are not highlighted will be fixed with the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Syntax Highlighter - W3Schools
Learn how to create and use a Syntax Highlighter. Syntax Highlighter. Code snippets are easier to read when you add some color:.
Read more >
HTML attribute: autocomplete - MDN Web Docs
The HTML autocomplete attribute lets web developers specify what if any permission the user agent has to provide automated assistance in filling out...
Read more >
Change Autocomplete Styles in WebKit Browsers - CSS-Tricks
We got a nice tip from Lydia Dugger via email with a method for changing the styles that WebKit browsers apply to form...
Read more >
syntax highlighting and auto-completion for CSS?
css -mode already does syntax highlighting out of the box. Not to mention you're asking two very different questions here.
Read more >
Ace Editor autocomplete and multiple languages
I use Aptana, which I think is a very fine and enhanced IDE, but even that doesn't highlight html code in say an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found