tobago-tree: custom elements; fix: margin-left for treeNodes in sheet
Issue: TOBAGO-1633
diff --git a/tobago-core/src/main/resources/scss/_tobago.scss b/tobago-core/src/main/resources/scss/_tobago.scss
index 38b92ca..ff14401 100644
--- a/tobago-core/src/main/resources/scss/_tobago.scss
+++ b/tobago-core/src/main/resources/scss/_tobago.scss
@@ -109,6 +109,14 @@
}
}
+@mixin treeNodeMarginLeftLevel() {
+ @for $i from 0 through 20 {
+ tobago-tree-node[data-tobago-level='#{$i}'] {
+ margin-left: #{$i}rem;
+ }
+ }
+}
+
/* badge -------------------------------------------------------------- */
.tobago-badge {
}
@@ -1193,6 +1201,8 @@
tobago-sheet {
.tobago-sheet-cell {
+ @include treeNodeMarginLeftLevel();
+
> tobago-tree-node {
display: flex;
align-items: center;
@@ -1497,20 +1507,12 @@
margin-left: 7rem;
}
-@mixin treeNodeMarginLeftLevel() {
-
-}
-
tobago-tree {
+ @include treeNodeMarginLeftLevel();
+
tobago-tree-node {
display: block;
- @for $i from 0 through 20 {
- &[data-tobago-level='#{$i}'] {
- margin-left: #{$i}rem;
- }
- }
-
tobago-tree-select {
display: inline;
}