Commit 2055001
committed
fix inlay hints being offset by 1px in some cases
VS Code previously applied the `vertical-align: middle` CSS rule to all hints,
even those that have the same font style as the editor's. This results in
inlay hints being 1px lower than they should be.
This pull request adds the `isUniform` flag to `_getLayoutInfo()`'s output. It
indicates if the inlay hint styles and editor styles match. If they do, the
`vertical-align` rule is set to `baseline`, effectively disabling it.1 parent e775136 commit 2055001
File tree
1 file changed
+14
-4
lines changed- src/vs/editor/contrib/inlayHints/browser
1 file changed
+14
-4
lines changedLines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
590 | 592 | | |
| 593 | + | |
| 594 | + | |
591 | 595 | | |
592 | 596 | | |
593 | 597 | | |
594 | 598 | | |
595 | | - | |
596 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
597 | 607 | | |
598 | 608 | | |
599 | 609 | | |
| |||
0 commit comments