-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy path_labels.scss
More file actions
90 lines (79 loc) · 2.25 KB
/
_labels.scss
File metadata and controls
90 lines (79 loc) · 2.25 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
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
//
// Labels
//
.form-label {
margin-bottom: $form-label-margin-bottom;
@include font-size($form-label-font-size);
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
color: $form-label-color;
}
// OUDS mod: states for labels
.is-disabled,
[disabled] .form-label {
color: $form-label-disabled-color;
}
.is-required::after {
position: absolute;
margin-left: 4px;
font-weight: $ouds-font-weight-system-web-strong;
color: $ouds-color-content-status-negative;
content: "*";
}
.form-helper {
position: relative;
display: inline-block;
flex-shrink: 0;
padding: 0;
background: transparent;
border: 0;
&::before {
position: absolute;
top: 50%;
left: 50%;
width: calc(#{$form-helper-size} - 5px);
height: calc(#{$form-helper-size} - 5px);
content: "";
background-color: $form-helper-bg;
border-radius: 50%; // stylelint-disable-line property-disallowed-list
transform: translate(-50%, -50%);
}
&::after {
display: block;
width: $form-helper-size;
height: $form-helper-size;
content: "";
background-color: $form-helper-color;
mask: no-repeat center/100% $form-helper-icon;
}
.form-label + & {
margin-bottom: $form-helper-label-margin-bottom;
vertical-align: bottom;
}
}
.is-required ~ .form-helper {
margin-left: .5625rem; // 9px
}
// End mod
// For use with horizontal and inline forms, when you need the label (or legend)
// text to align with the form controls.
.col-form-label {
padding-top: calc($input-padding-y + $input-border-width);
padding-bottom: calc($input-padding-y + $input-border-width);
margin-bottom: 0; // Override the `<legend>` default
@include font-size(inherit); // Override the `<legend>` default
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
line-height: $input-line-height;
color: $form-label-color;
}
.col-form-label-lg {
padding-top: calc($input-padding-y-lg + $input-border-width);
padding-bottom: calc($input-padding-y-lg + $input-border-width);
@include font-size($input-font-size-lg);
}
.col-form-label-sm {
padding-top: calc($input-padding-y-sm + $input-border-width);
padding-bottom: calc($input-padding-y-sm + $input-border-width);
@include font-size($input-font-size-sm);
}