be5invis/vscode-custom-css

Comment mouse hover causes problems with selecting line

StakFallT opened this issue · 1 comments

I'm not sure whether this is an issue with vscode-custom-css or the them I'm using (https://github.com/coltwillcox/synthwave-x-fluoromachine-contrast). I suspect it's vscode-custom-css but I'm not completely certain. In any case, when working with Python code and hovering over a comment, the comment line will jut a little to the left and get slightly bigger. This presents a big problem because if you try to select where the text of that line actually starts (and not the whole line), the aesthetic will regularly throw off the user during selection because the selection highlight doesn't match the same size / offset of where the text is now at. I figured out where it was coming from (at least on Linux); it's lines [315, 333] of workbench.html. For me that file is located at : /usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html

So to recap, the original code looked like this:

/* Hover specials */
.mtk8,
.mtk9,
.mtk3,
.mtk6,
.mtk7,
.mtk10 {
	display: inline-block;
	transition: 0.1s transform;
}

.mtk8:hover,
.mtk9:hover,
.mtk3:hover,
.mtk6:hover,
.mtk7:hover,
.mtk10:hover {
	text-shadow: 2 2 15px;
	transform: scale(1.05);
}

I changed it to:

/* Hover specials */
/** /
.mtk8,
.mtk9,
.mtk3,
.mtk6,
.mtk7,
.mtk10 {
	display: inline-block;
	transition: 0.1s transform;
}

.mtk8:hover,
.mtk9:hover,
.mtk3:hover,
.mtk6:hover,
.mtk7:hover,
.mtk10:hover {
	text-shadow: 2 2 15px;
	transform: scale(1.05);
}
/**/

This effectively takes out the jumping around the hovered line does while still preserving its contents in case someone wants to fix it in the future so it doesn't mess up the text-selection's highlight.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.