Skip to content

Commit 9d8d83c

Browse files
authored
feat(design): add extra right padding to parent tree items (#3033)
1 parent 76cb889 commit 9d8d83c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

libs/design/tree/src/tree-item/tree-item.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class DaffTreeItemDirective {
4848
*
4949
* @docs-private
5050
*/
51-
@HostBinding('class.daff-tree-item__parent') classParent = false;
51+
@HostBinding('class.parent') classParent = false;
5252

5353
/**
5454
* The html `id` of the tree item. This is derived from the {@link DaffTreeData}.

libs/design/tree/src/tree/tree.component.scss

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
margin: 0;
1010
padding: 0;
1111
list-style: none;
12-
--tree-padding: 16px;
12+
--tree-padding: 1rem;
1313

1414
li.hidden {
1515
display: none;
@@ -23,7 +23,7 @@
2323
position: relative;
2424
background: none;
2525
border: 0;
26-
padding: 8px 16px 8px 0;
26+
padding: 0.5rem 1rem 0.5rem 0;
2727
line-height: 1.5rem;
2828
font-weight: 400;
2929
text-align: left;
@@ -37,7 +37,7 @@
3737
top: 0;
3838
bottom: 0;
3939
left: 0;
40-
width: 4px;
40+
width: 0.25rem;
4141
}
4242

4343
&:focus,
@@ -49,19 +49,20 @@
4949
font-weight: 600;
5050
}
5151

52-
&__parent {
52+
&.parent {
5353
position: relative;
54+
padding-right: 2.5rem;
5455

5556
&::after {
5657
content: '';
5758
position: absolute;
5859
top: 48%;
59-
right: 16px;
60+
right: 1rem;
6061
display: inline-block;
6162
border-right: 2px solid currentColor;
6263
border-bottom: 2px solid currentColor;
63-
width: 8px;
64-
height: 8px;
64+
width: 0.5rem;
65+
height: 0.5rem;
6566
transform: translateY(-50%) rotate(45deg);
6667
transition: transform 150ms;
6768
}

0 commit comments

Comments
 (0)