Atom编辑器如何设置透明背景?

Atom editor how to set up transparent background?

我正在使用 atom 文本编辑器并尝试自定义 UI。我在设置中找不到更改不透明度的选项,谁能告诉我要在 styles.less 文件上更改什么?我知道的不多CSS。这是默认的 styles.less 文件:

// style the background color of the tree view
.tree-view {
  // background-color: whitesmoke;
}

// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
  // color: white;
  // background-color: hsl(180, 24%, 12%);
}

// style UI elements inside atom-text-editor
atom-text-editor .cursor {
  // border-color: red;
}

您不能仅通过更改样式表来使其透明,您将不得不从源代码重建 atom 并更改一些初始选项,例如: https://github.com/transcranial/atom-transparency

Atom 是一个电子应用程序 (https://electronjs.org/),您必须明确设置选项以允许应用程序透明。您必须设置 frame: falsetransparent: true.

完成并构建完成后,您可以更改所有涉及的图层并设置某种透明度,为每个图层的颜色添加一个 alpha 通道:

html, atom-pane, ... {
  background-color: hsla(180, 24%, 12%, .5);
}

对于 Linux 用户,您可以使用合成器、transset-df 和 devilspie - https://wiki.archlinux.org/index.php/Per-application_transparency