减少 angular material 树中的行高

Reducing line height in angular material tree

我正在使用 angular tree material 来显示 JSON 数据,我对行与行之间的空白量不满意。我试过在 css 中玩 mat-tree-node.line-height 零变化。我怎样才能减少所有这些垂直的白色 space?

只需覆盖他们的 css:

.mat-tree-node { min-height: 30px }

我在嵌套元素(和嵌套树)上使用 angular 8 找到的唯一工作方式是

.mat-tree-node {
  min-height: 1.2em !important;
  height: 1.2em;
}