Fixes #129522 by introducing verticalAlign render option.
This commit is contained in:
parent
ac22bcaa06
commit
53c50875c9
|
@ -387,7 +387,9 @@ export const _CSS_MAP: { [prop: string]: string; } = {
|
|||
margin: 'margin:{0};',
|
||||
padding: 'padding:{0};',
|
||||
width: 'width:{0};',
|
||||
height: 'height:{0};'
|
||||
height: 'height:{0};',
|
||||
|
||||
verticalAlign: 'vertical-align:{0};',
|
||||
};
|
||||
|
||||
|
||||
|
@ -568,7 +570,7 @@ class DecorationCSSRules {
|
|||
|
||||
cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped));
|
||||
}
|
||||
this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin', 'padding'], cssTextArr);
|
||||
this.collectCSSText(opts, ['verticalAlign', 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin', 'padding'], cssTextArr);
|
||||
if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) {
|
||||
cssTextArr.push('display:inline-block;');
|
||||
}
|
||||
|
|
|
@ -643,6 +643,7 @@ export interface IContentDecorationRenderOptions {
|
|||
color?: string | ThemeColor;
|
||||
backgroundColor?: string | ThemeColor;
|
||||
opacity?: string;
|
||||
verticalAlign?: string;
|
||||
|
||||
margin?: string;
|
||||
padding?: string;
|
||||
|
|
|
@ -171,6 +171,7 @@ export class InlayHintsController implements IEditorContribution {
|
|||
fontFamily: `var(${fontFamilyVar})`,
|
||||
padding: `0px ${(fontSize / 4) | 0}px`,
|
||||
borderRadius: `${(fontSize / 4) | 0}px`,
|
||||
verticalAlign: 'middle',
|
||||
};
|
||||
const key = 'inlayHints-' + hash(before).toString(16);
|
||||
this._codeEditorService.registerDecorationType('inlay-hints-controller', key,
|
||||
|
|
Loading…
Reference in a new issue