summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/logic/generic-artifact-browser/generic-artifact-browser-column-provider.component.less
blob: 07241a8afff51c01057e3f8e8fb610ba2d028b1d (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
.adaptive_placeholder(@height, @radius, @margin: 0em, @border: 1px) {
  @borders: (@border * 2);
  box-sizing: border-box;
  width: 80%;
  height: ~"calc(@{height} + @{borders})";
  margin: @margin;
  padding: @margin;
  border: @border solid #00bafa;
  border-radius: @radius;
  background: #fff;
  resize: none;
  outline: none;
  &[required] {
    &:focus {
      border-color: #00bafa;
      + label {
        &[placeholder] {
          &:before {
            margin: 0;
            color: #00bafa;
          }
        }
      }
    }
    &:focus,
    &:valid {
      + label {
        &[placeholder] {
          &:before {
            transform: translate(0, (-1em)) scale(.9, .9);
          }
        }
      }
    }
    &:invalid {
      + label {
        &[placeholder] {
          &[alt] {
            &:before {
              content: attr(alt);
            }
          }
        }
      }
    }
    + label {
      &[placeholder] {
        display: block;
        pointer-events: none;
        line-height: @margin * 1.25;
        margin-top: ~"calc(-1em - @{borders})";
        margin-bottom: ~"calc((@{height} - @{margin}) + @{borders})";
        &:before {
          content: attr(placeholder);
          display: inline-block;
          margin: 0 ~"calc(@{margin} + @{borders})";
          padding: 0 2px;
          color: #00bafa;
          font-size: small;
          white-space: nowrap;
          transition: .3s ease-in-out;

          background-image: linear-gradient(to bottom, #fff, #fff);
          background-size: 100% 5px;
          background-repeat: no-repeat;
          background-position: center;
        }
      }
    }
  }
}

.gab-column-provider-form {
  margin: 5px
}

.gab-column-provider-input {
  @height: 2em;
  &[type="text"] {
    .adaptive_placeholder(@height, (@height / 2));
  }
}

.gab-column-provider-input.ng-valid[required], .gab-column-provider-input.ng-valid.required  {
  border-left: 5px solid #42bb48;
  border-right: 5px solid #42bb48;
}

.gab-column-provider-input.ng-invalid:not(form)  {
  border-left: 5px solid #ff0511;
  border-right: 5px solid #ff0511;
}