Skip to content

Background colour from options.theme is applied to wrong container element #5781

@lorumic

Description

@lorumic

Details

  • Browser and browser version: Google Chrome v146.0.7680.153
  • OS version: Ubuntu 24.04.4 LTS
  • xterm.js version: 6.0.0

Steps to reproduce

Hello, first of all thanks for the great work with xterm.js!
We came across the v6.0.0 update, and this seems to break our custom background style, passed via options.theme:

const options = {
  theme: {
    background: "#292c2f",
  },
};

const term = new Terminal(options);

Before (v5.5.0), the background-color style used to be applied to the top container (.xterm-viewport), but in v6.0.0 it seems to be applied to its child, the .xterm-scrollable-element container instead, which is slightly smaller than its parent, causing a border with the default background colour (#000) to appear around the element:

  • Before (v5.5.0)
Image
  • After (v6.0.0)
Image

Expected behaviour: the background colour should be applied to the .xterm-viewport element as it was in v5.5.0, to avoid the visual glitch shown above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions