How to override matTreeNodePadding style in Material?

Viewed 3725

There is Material Attribute matTreeNodePadding that sets padding-left for DOM element:

<div matTreeNodePadding></div>

After rendering this block comes to:

   <div style="padding-left: 40px;"></div>

How to reduce this padding to 20px?

1 Answers

The matTreeNodePadding is a directive build for mat-tree and mat-tree-node component, should be used like that :

<mat-tree-node matTreeNodePadding matTreeNodePaddingIndent="20">
or
<mat-tree-node matTreeNodePadding [matTreeNodePaddingIndent]="20">

Related