Using the formatting feature (CTRL-Shift-F keyboard shortcut) to format the CSS source corrupts CSS variables.
CSS source before formatting:
:root {
--scrollbar-width: 2em;
}
.btnX {
right: calc(10px + var(--scrollbar-width));
}
Pressing CTRL-Shift-F changes the above to:
:root { -
-scrollbar-width: 2em;
}
.btnX {
right: calc(10px + var(- -scrollbar-width));
}
Problems:
- The first hyphen is moved up, so the variable declaration is broken.
- The var() reference is also broken due to a space added between hyphens.
I have searched Eclipse bug tracker and found the following issue about the same exact issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=492844
Please consider fixing,
GR.