_form-adv-label.scss
1.34 KB
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
.floating-label {
color: $black-hint;
cursor: text;
font-size: $font-size;
line-height: 1;
margin: 0;
padding: 0;
position: absolute;
top: (($input-height - $font-size) / 2);
left: 0;
@include transition(color 0.3s $timing, font-size 0.3s $timing, top 0.3s $timing);
.form-group-label [class*="col-"] & {
// position
left: $grid-gutter;
}
.form-group-label.control-focus &,
.form-group-label.control-highlight & {
color: $black-sec;
font-size: ($input-height - $line-height);
// position
top: (($input-height - $line-height) * -1);
}
.form-group-label.control-focus & {
color: $link-color;
}
}
.form-group-label {
margin-top: ($line-height * 1.5);
margin-bottom: ($line-height * 1.5);
position: relative;
.form-control {
position: relative;
z-index: 1;
@include placeholder(transparent);
}
}
// colour
@each $color in $palette-list {
$i: index($palette-list, $color);
.form-group-label.form-group-#{$color} .floating-label {
color: nth($palette-color, $i);
}
}
.form-icon-label {
cursor: pointer;
display: block;
padding: (($input-height - $line-height) / 2) 0;
.form-group-icon.control-focus & {
color: $link-color;
}
}
// colour
@each $color in $palette-list {
$i: index($palette-list, $color);
.form-group-icon.form-group-#{$color} .form-icon-label {
color: nth($palette-color, $i);
}
}