summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/logic/properties-table/dynamic-property/dynamic-property.component.less
blob: 601aaae2f910d5735e391286c69c0c9d70fd8dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@import '../../../../../../assets/styles/variables.less';

.flat-children-container {
  .dynamic-property-row {
    /*create nested left border classes for up to 10 levels of nesting*/
    .nested-border-loop(@i) when (@i > 0) {
      @size: (@i - 1) *2;
      &.nested-level-@{i} .table-cell:first-child {
        border-left: ~"solid @{size}px #009fdb";
      }
      .nested-border-loop(@i - 1)
    }
    .nested-border-loop(10);
  }

  .dynamic-property {
    &:first-child .dynamic-property-row.with-top-border {
      border-top: solid 1px #d2d2d2;
    }

    &:not(:last-child) .dynamic-property-row {
      border-bottom: solid 1px #d2d2d2;
    }
  }
}

.dynamic-property-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;

  &.readonly {
    background-color: @tlv_color_t;
    cursor: auto;
  }

  //for the case that the parent is disabled but the child is enabled
  &:not(.readonly) {
    background-color: @main_color_p;
  }

  .table-cell {
    flex: 1;
    padding: 9px;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    &:first-child {
      flex: 0 0 50%;
      border-right: #d2d2d2 solid 1px;

      &:only-of-type {
        flex: 1 1 100%;
        border-right: none;
      }
    }

    &.empty {
      height: 40px;
    }
  }

  .property-icon {
    flex: 0 0 auto;
    margin-right: 10px;
    align-self: center;
    cursor: pointer;
  }

}

.filtered {
  /deep/ .checkbox-label-content {
    background-color: yellow;
  }
}

.inner-cell-div {
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  display: inline;
  padding-left: 8px;
}

.error {
  border: solid 1px @func_color_q;
  color: @func_color_q;
  outline: none;
  box-sizing: border-box;
}