Skip to content

Commit

Permalink
feat(design): add extra right padding to parent tree items (#3033)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint authored Aug 26, 2024
1 parent 76cb889 commit 9d8d83c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libs/design/tree/src/tree-item/tree-item.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class DaffTreeItemDirective {
*
* @docs-private
*/
@HostBinding('class.daff-tree-item__parent') classParent = false;
@HostBinding('class.parent') classParent = false;

/**
* The html `id` of the tree item. This is derived from the {@link DaffTreeData}.
Expand Down
15 changes: 8 additions & 7 deletions libs/design/tree/src/tree/tree.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
margin: 0;
padding: 0;
list-style: none;
--tree-padding: 16px;
--tree-padding: 1rem;

li.hidden {
display: none;
Expand All @@ -23,7 +23,7 @@
position: relative;
background: none;
border: 0;
padding: 8px 16px 8px 0;
padding: 0.5rem 1rem 0.5rem 0;
line-height: 1.5rem;
font-weight: 400;
text-align: left;
Expand All @@ -37,7 +37,7 @@
top: 0;
bottom: 0;
left: 0;
width: 4px;
width: 0.25rem;
}

&:focus,
Expand All @@ -49,19 +49,20 @@
font-weight: 600;
}

&__parent {
&.parent {
position: relative;
padding-right: 2.5rem;

&::after {
content: '';
position: absolute;
top: 48%;
right: 16px;
right: 1rem;
display: inline-block;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
width: 8px;
height: 8px;
width: 0.5rem;
height: 0.5rem;
transform: translateY(-50%) rotate(45deg);
transition: transform 150ms;
}
Expand Down

0 comments on commit 9d8d83c

Please sign in to comment.