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.

Color picker does not register for color strings in .tsx files

See original GitHub issue

Describe the bug (including copyable syntax) The built-in VSCode color picker normally shows up next to color strings (i.e. hex, rgb) within typescriptreact and javascriptreact files. After updating to the newest version, these color strings are no longer considered ranges to trigger the color picker.

Screenshot Version 1.7.3: image

Version 1.7.2: image

To Reproduce Create a .tsx file with the following content:

const red = '#ff0000'

Expected behavior The built-in VSCode color picker appears next to the hex color string.

Build environment (please complete the following information):

  • OS: macOS 12.1
  • VSCode Version: 1.65.1
  • Extension Version 1.7.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
zqy233commented, Mar 11, 2022

Thanks for raising @DanielHZhang Would you be ok to work on this?

https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md

you would just need to clone this project, npm install, then launch the extension

I found it was the problem with “esbuild”, use “0.14.2” or “0.14.3” , it would be ok , but later version ,Color picker does not work such as “0.14.23” and “0.14.25”

0reactions
jasonwilliamscommented, Mar 25, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

how to bring the vscode css color picker feature into js file with ...
I had the problem that TSX (TypeScript files with XML) wouldn't properly highlight the color. The solution was to add "typescriptreact" to ...
Read more >
Cannot resolve anchor warning in TSX file for string color hex ...
Cannot resolve anchor warning in TSX file for string color hex code ... What steps will reproduce the issue? ... Workaround is to...
Read more >
@gnucoop/ngx-color-picker - npm
This is a simple color picker based on the cool angular2-color-picker by Alberplz. This documentation is for the latest 5/6.
Read more >
User and Workspace Settings - Visual Studio Code
Some settings can only be edited in settings.json such as Workbench: Color Customizations and show a Edit in settings.json link in the Settings...
Read more >
property 'title' does not exist on type 'never'.ts(2339) - You.com
In order to eliminate any inconsistency I'm trying to convert this to TypeScript. It is currently .js and all other files are `.tsx'....
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