use css class for statics

This commit is contained in:
meganrogge
2022-02-03 13:44:08 -06:00
parent b2f541d4a6
commit 42d403807c
2 changed files with 7 additions and 4 deletions
+5
View File
@@ -173,3 +173,8 @@
.xterm-strikethrough {
text-decoration: line-through;
}
.xterm-screen canvas .xterm-decoration {
z-index: 6;
position: absolute;
}
+2 -4
View File
@@ -54,7 +54,7 @@ export class DecorationsService extends Disposable implements IDecorationsServic
if (line < 0 || line > this._bufferService.rows) {
decoration.element.style.display = 'none';
} else {
decoration.element.style.top = `${(line)*this._renderService.dimensions.scaledCellHeight}px`;
decoration.element.style.top = `${line *this._renderService.dimensions.scaledCellHeight}px`;
decoration.element.style.display = 'block';
}
}
@@ -129,10 +129,8 @@ class BufferDecoration extends Disposable implements IDecoration {
this._element.style.width = `${this._decorationOptions.width}px`;
this._element.style.height = `${this._decorationOptions.height}px`;
this._element.style.top = `${this._marker.line * this._renderService.dimensions.scaledCellHeight}px`;
this._element.style.zIndex = '6';
this._element.style.position = 'absolute';
if (this._decorationOptions.x && this._decorationOptions.x < 0) {
throw new Error(`cannot create a decoration with a negative x offset: ${this._decorationOptions.x}`);
throw new Error(`Cannot create a decoration with a negative x offset: ${this._decorationOptions.x}`);
}
if (this._decorationOptions.anchor === 'right') {
this._element.style.right = this._decorationOptions.x ? `${this._decorationOptions.x * this._renderService.dimensions.scaledCellWidth}px` : '';