Just to show how multi-line comments can be super painful too:
[data-md-color-scheme="slate"] {
--doc-symbol-parameter-fg-color: #829bd1;
--doc-symbol-parameter-bg-color: #829bd11a;
}
I comment the third line with my editor shortcut:
[data-md-color-scheme="slate"] {
--doc-symbol-parameter-fg-color: #829bd1;
/* --doc-symbol-parameter-bg-color: #829bd11a; */
}
Then I comment the whole block, because reasons:
/* [data-md-color-scheme="slate"] {
--doc-symbol-parameter-fg-color: #829bd1;
/* --doc-symbol-parameter-bg-color: #829bd11a; */
} */
It’s a syntax error.
Essentially, you cannot comment/uncomment a bunch of consecutive line without first having to uncomment previously commented overlapping lines.
[data-md-color-scheme="default"] {
--doc-symbol-parameter-fg-color: #829bd1;
--doc-symbol-parameter-bg-color: #829bd11a;
}
[data-md-color-scheme="slate"] {
--doc-symbol-parameter-fg-color: #829bd1;
--doc-symbol-parameter-bg-color: #829bd11a;
}
I’ll comment the middle:
[data-md-color-scheme="default"] {
--doc-symbol-parameter-fg-color: #829bd1;
/* --doc-symbol-parameter-bg-color: #829bd11a;
}
[data-md-color-scheme="slate"] {
--doc-symbol-parameter-fg-color: #829bd1; */
--doc-symbol-parameter-bg-color: #829bd11a;
}
Now for some reason I want to overwrite the first --doc-symbol-parameter-fg-color
with the second, so I uncomment this line only:
[data-md-color-scheme="default"] {
--doc-symbol-parameter-fg-color: #829bd1;
/* --doc-symbol-parameter-bg-color: #829bd11a;
}
[data-md-color-scheme="slate"] {
/* --doc-symbol-parameter-fg-color: #829bd1; */ */
--doc-symbol-parameter-bg-color: #829bd11a;
}
Doesn’t work, it was commented a second time. I have to uncomment the whole thing, then recomment the 2nd-to-6th or 3rd-to-6th lines again.
Now yes, editors could be smart about it, and use the embedded-comment syntax when commenting a selection on a single line, and use single-line comment syntax when there’s no selection (comment line where the cursor is), or when the selection spans multiple lines, or when there are multiple cursors. So, just my 2 cents