-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy path_patterns_forms.scss
72 lines (60 loc) · 1.4 KB
/
_patterns_forms.scss
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
@import 'settings';
@mixin vf-p-forms {
@include vf-p-forms-stacked;
@include vf-p-forms-inline;
// FIXME: should buttons outside of a form be related to the form?
// We should avoid targetting form element types
// stylelint-disable-next-line selector-max-type
form + [class*='p-button'] {
margin-top: $spv--x-large;
}
}
@mixin vf-p-forms-stacked {
.p-form--stacked {
width: 100%;
.p-form__group {
@media (min-width: $threshold-6-12-col) {
align-items: baseline;
+ .p-form__group {
margin-top: $spv--small;
}
}
}
}
}
@mixin vf-p-forms-inline {
.p-form--inline {
@media (min-width: $threshold-6-12-col) {
align-items: baseline;
display: inline-flex;
flex-direction: row;
flex-wrap: wrap;
> * {
margin-right: $sph--x-large;
}
}
.p-form__group {
@media (min-width: $threshold-6-12-col) {
display: flex;
flex-shrink: 1;
width: auto;
+ [class*='p-button'] {
flex-shrink: 1;
}
.p-form__label,
.p-form__control,
.p-form-validation__message {
align-self: baseline;
box-sizing: border-box;
}
.p-form__label {
flex-shrink: 0;
padding-right: $sph--large;
}
.p-form__control {
display: inline-block;
}
}
}
}
}