vscode-css-modules icon indicating copy to clipboard operation
vscode-css-modules copied to clipboard

Feature request: Jump to last CSS property when clicking on a class name

Open city17 opened this issue 4 years ago • 2 comments

Suggestion for a small improvement. Currently if you CMD click on a specific classname (styles.classname), it takes you to that class in the CSS modules file.

The cursor is placed at the very start of that class, just after the dot, before the class name, like so:

Schermafbeelding 2021-09-13 om 10 02 56

For me it would be an improvement if the cursor were automatically placed at the end of the last property of that class, like so:

Schermafbeelding 2021-09-13 om 10 03 06

This way, you can instantly start adding new properties to the class, making it a bit faster workflow.

city17 avatar Sep 13 '21 08:09 city17

@clinyong linyong, what's your opinion ?

iChenLei avatar Sep 13 '21 08:09 iChenLei

Since we are using the regular expression to parse css code, I think it is not easy to do that. And consider the nested classes, it will become more complicated.

.container {

  .left {}
}

Maybe we can think about it after finishing the tokenize work.

clinyong avatar Sep 15 '21 03:09 clinyong