Skip to content
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

incorrect highlighting inside of :nth-.*() #33

Open
Etsi0 opened this issue Oct 14, 2024 · 4 comments
Open

incorrect highlighting inside of :nth-.*() #33

Etsi0 opened this issue Oct 14, 2024 · 4 comments

Comments

@Etsi0
Copy link

Etsi0 commented Oct 14, 2024

Type: Bug

When using :not() or [hidden] within an nth-.*() selector, the text highlighting breaks.
I'm not aware of anything else that brakes within an nth-.*() selector.

VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.92GB (20.89GB free)
Process Argv --crash-reporter-id 6f085191-f5f9-4ae7-92db-7c26f44bb0a9
Screen Reader no
VM 0%
Extensions (28)
Extension Author (truncated) Version
better-comments aar 3.0.2
codesnap adp 1.3.4
Bookmarks ale 13.5.0
vscode-intelephense-client bme 1.12.6
vscode-tailwindcss bra 0.12.11
vscode-eslint dba 3.0.10
gitlens eam 15.6.0
vsc-material-theme Equ 34.7.5
prettier-vscode esb 11.0.0
class-collapse Ets 0.0.8
auto-rename-tag for 0.1.10
discord-vscode icr 5.8.0
debugpy ms- 2024.10.0
python ms- 2024.16.1
vscode-pylance ms- 2024.10.1
cmake-tools ms- 1.19.52
cpptools ms- 1.21.6
cpptools-extension-pack ms- 1.3.0
vscode-typescript-next ms- 5.7.20241013
indent-rainbow ode 8.3.1
material-icon-theme PKi 5.11.1
vscode-css-peek pra 4.4.1
LiveServer rit 5.7.9
code-spell-checker str 3.0.1
code-spell-checker-swedish str 1.3.1
cmake twx 0.0.17
errorlens use 3.20.0
pretty-ts-errors Yoa 0.6.0

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
724cj586:31013169
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
impr_priority:31102340
nativerepl1:31139838
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca1:31156133
notype1:31157159
showchatpanel:31153267
5fd0e150:31155592

@lramos15 lramos15 assigned aeschli and unassigned lramos15 Oct 14, 2024
@aeschli aeschli assigned alexr00 and unassigned aeschli Dec 9, 2024
@aeschli
Copy link

aeschli commented Dec 9, 2024

@Etsi0 Can you provide a css code snippet that shows the problem?
That way we know we don't need to guess...

@Etsi0
Copy link
Author

Etsi0 commented Dec 9, 2024

@aeschli This was the css snippet i made when i noticed this issue

table thead tr:nth-child(odd of :not([hidden])),
table:has(thead tr:last-child:nth-child(even of :not([hidden]))) tbody tr:nth-child(odd of :not([hidden])),
table:has(thead tr:last-child:nth-child(odd of :not([hidden]))) tbody tr:nth-child(even of :not([hidden])),
table:has(thead tr:last-child:nth-child(even of :not([hidden]))):has(tbody tr:last-child:nth-child(odd of :not([hidden]))) tfoot tr:nth-child(even of :not([hidden])),
table:has(thead tr:last-child:nth-child(even of :not([hidden]))):has(tbody tr:last-child:nth-child(even of :not([hidden]))) tfoot tr:nth-child(odd of :not([hidden])),
table:has(thead tr:last-child:nth-child(odd of :not([hidden]))):has(tbody tr:last-child:nth-child(odd of :not([hidden]))) tfoot tr:nth-child(odd of :not([hidden])),
table:has(thead tr:last-child:nth-child(odd of :not([hidden]))):has(tbody tr:last-child:nth-child(even of :not([hidden]))) tfoot tr:nth-child(even of :not([hidden])) {
  background-color: #f0f0f0;
}

// Albin

@RedCMD
Copy link
Contributor

RedCMD commented Dec 10, 2024

maybe dup?

@alexr00 alexr00 transferred this issue from microsoft/vscode Dec 10, 2024
@alexr00 alexr00 removed their assignment Dec 10, 2024
@alexr00
Copy link
Member

alexr00 commented Dec 10, 2024

I can repro, thanks for the snippet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants