microsoft / microsoft/vscode

# selector in CSS is misinterpreted as color

Open
#333,351 0 comments 0 reactions 1 assignee Claimed by @aiday-mar View on GitHub
bug editor-color-picker
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

When coding css inside a php file, the selectors which use hastags have a little box on the left to choose a color.

This doesn't happen when HTML is selected, only when PHP is selected.
https://www.pasteboard.co/4je2EzN8MgJs.png

VS Code version: Code 1.135.0 (08d4889f9ec4a1685d257b9b95de036c8e1ce1e5, 2026-08-25T14:26:52Z)
OS version: Linux x64 6.14.0-37-generic snap
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|13th Gen Intel(R) Core(TM) i9-13900K (32 x 5500)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x0000 [Google Inc. (NVIDIA Corporation)], DEVICE=0x0000 [ANGLE (NVIDIA Corporation, NVIDIA GeForce RTX 4090/PCIe/SSE2, OpenGL 4.5.0 NVIDIA 580.95.05)], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=580.95.05 *ACTIVE*
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgpu: enabled
webgpu_on_vk_via_gl_interop: disabled_off
webnn: disabled_off|
|Load (avg)|1, 0, 0|
|Memory (System)|61.54GB (50.69GB free)|
|Process Argv|--no-sandbox --force-user-env --ozone-platform=x11 --crash-reporter-id 29cff8d3-20ca-48df-bb21-7310ff27bcb4|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|ubuntu|
|XDG_CURRENT_DESKTOP|ubuntu:GNOME|
|XDG_SESSION_DESKTOP|ubuntu|
|XDG_SESSION_TYPE|wayland|
Extensions (43)

Name|Identifier|Author|Version
---|---|---|---
Fontawesome Search|adriandoescoding.fontawesome-search|AdrianDoesCoding|1.0.0
Node Essentials|afractal.node-essentials|afractal|1.1.0
Nomo Dark Icon Theme|be5invis.vscode-icontheme-nomo-dark|be5invis|1.3.9
Path Intellisense|christian-kohler.path-intellisense|christian-kohler|2.10.0
smoothscroll|cyansprite.smoothscroll|cyansprite|1.0.4
ESLint|dbaeumer.vscode-eslint|dbaeumer|3.0.34
Composer|devsense.composer-php-vscode|DEVSENSE|1.73.19214
IntelliPHP - AI Autocomplete for PHP|devsense.intelli-php-vscode|DEVSENSE|0.12.17700
PHP|devsense.phptools-vscode|DEVSENSE|1.73.19214
PHP Profiler|devsense.profiler-php-vscode|DEVSENSE|1.73.19214
ES7+ React/Redux/React-Native snippets|dsznajder.es7-react-js-snippets|dsznajder|4.4.3
GitLens — Git supercharged|eamodio.gitlens|eamodio|18.3.0
EditorConfig|editorconfig.editorconfig|EditorConfig|0.18.2
Box Shadow|ephremadugna.box-shadow|EphremAdugna|0.5.0
Auto Rename Tag|formulahendry.auto-rename-tag|formulahendry|0.1.10
GitHub Pull Requests|github.vscode-pull-request-github|GitHub|0.162.0
Gemini Code Assist|google.geminicodeassist|google|2.98.0
SVG|jock.svg|jock|1.5.4
Python Indent|kevinrose.vsc-python-indent|KevinRose|1.21.0
DotENV|mikestead.dotenv|mikestead|1.0.1
HTML Format|mohd-akram.vscode-html-format|mohd-akram|0.1.6
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
JavaScript and TypeScript Nightly|ms-vscode.vscode-typescript-next|ms-vscode|6.0.20260416
TSLint|ms-vscode.vscode-typescript-tslint-plugin|ms-vscode|1.3.4
Live Share|ms-vsliveshare.vsliveshare|ms-vsliveshare|1.1.122
[Deprecated] Debugger for Chrome|msjsdiag.debugger-for-chrome|msjsdiag|4.13.0
Codex – OpenAI’s coding agent|openai.chatgpt|openai|26.825.41651
Material Icon Theme|pkief.material-icon-theme|PKief|5.38.1
Red Hat Dependency Analytics|redhat.fabric8-analytics|redhat|1.0.0
YAML|redhat.vscode-yaml|redhat|1.24.0
Frosted Glass Theme|richardluo.frosted-glass-theme|RichardLuo|0.8.28
Format HTML in PHP|rifi2k.format-html-in-php|rifi2k|1.7.0
Live Server|ritwickdey.liveserver|ritwickdey|5.7.10
vscode-spotify|shyykoserhiy.vscode-spotify|shyykoserhiy|3.2.1
vscode-pets|tonybaloney.vscode-pets|tonybaloney|1.36.0
IntelliCode API Usage Examples|visualstudioexptteam.intellicode-api-usage-examples|VisualStudioExptTeam|0.2.9
IntelliCode|visualstudioexptteam.vscodeintellicode|VisualStudioExptTeam|1.3.2
Quokka.js|wallabyjs.quokka-vscode|WallabyJs|1.0.769
Import Cost|wix.vscode-import-cost|wix|3.3.0
Live Server (Five Server)|yandeu.five-server|yandeu|0.4.0

A/B Experiments

```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidtcf:31399634
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
46204921:31447328
control_6dc23131:31555649
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
23c7c724:31520045
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
a1ije391_t:31540920
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
gf14b233:31526830
ahp-both-windows:31556933
sessions_3:31532893
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
sandbox-ui-on-2:31543161
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
maidictation:31565333
0c1h4866:31566224
session-mark-done:31558131
5b8j3302:31564601
mangle-name-control:31572633
9e5id457:31573761
multiv2:31574985
permission_prompt_control:1332567
ccr_pr_nudge_auto_review:1319472
vsc_wsm_c:1340633
eh853263:1355661

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.