Color picker does not register for color strings in .tsx files
See original GitHub issueDescribe 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:
Version 1.7.2:
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:
- Created 2 years ago
- Reactions:9
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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”
This should be fixed in 1.7.4 https://github.com/styled-components/vscode-styled-components/releases/tag/v1.7.4