Skip to content

Commit 6ca4409

Browse files
committed
fix acf backoffice style to forms
1 parent a96723a commit 6ca4409

File tree

1 file changed

+70
-67
lines changed

1 file changed

+70
-67
lines changed

src/scss/03-base/_forms.scss

Lines changed: 70 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -10,91 +10,94 @@ $text-inputs-list: 'input[type="color"]', 'input[type="date"]',
1010

1111
$all-text-inputs: assign-inputs($text-inputs-list);
1212

13-
// Textarea
14-
textarea {
15-
resize: vertical;
16-
}
17-
18-
#{$all-text-inputs},
19-
textarea {
20-
box-sizing: border-box;
21-
width: 100%;
22-
padding: 15px 25px;
23-
font-family: $font-family-primary;
24-
line-height: 1;
25-
color: $color-text;
26-
background: color.adjust($color-light, $lightness: -5%);
27-
border: 1px solid $color-grey-500;
28-
border-radius: 10px; //reset border radius for ios
29-
transition: border-color .5s ease;
30-
appearance: none;
31-
32-
&::placeholder {
33-
color: color.adjust($color-text, $lightness: 50%);
34-
}
35-
36-
&:hover {
37-
border-color: color.adjust($color-grey-500, $lightness: -10%);
13+
// Not apply style to ACF fields
14+
*:not([class*="acf-"]) > {
15+
// Textarea
16+
textarea {
17+
resize: vertical;
3818
}
3919

40-
&:focus {
41-
color: color.adjust($color-text, $lightness: -10%);
42-
border-color: color.adjust($color-grey-500, $lightness: -20%);
43-
}
44-
}
45-
46-
// Label
47-
label {
48-
display: inline-block;
49-
font-weight: 700;
50-
}
20+
#{$all-text-inputs},
21+
textarea {
22+
box-sizing: border-box;
23+
width: 100%;
24+
padding: 15px 25px;
25+
font-family: $font-family-primary;
26+
line-height: 1;
27+
color: $color-text;
28+
background: color.adjust($color-light, $lightness: -5%);
29+
border: 1px solid $color-grey-500;
30+
border-radius: 10px; //reset border radius for ios
31+
transition: border-color .5s ease;
32+
appearance: none;
33+
34+
&::placeholder {
35+
color: color.adjust($color-text, $lightness: 50%);
36+
}
5137

52-
// Custom select
53-
select {
54-
@include select-custom;
55-
}
38+
&:hover {
39+
border-color: color.adjust($color-grey-500, $lightness: -10%);
40+
}
5641

57-
input[type="checkbox"],
58-
input[type="radio"] {
59-
@include checkbox-custom;
42+
&:focus {
43+
color: color.adjust($color-text, $lightness: -10%);
44+
border-color: color.adjust($color-grey-500, $lightness: -20%);
45+
}
46+
}
6047

61-
&:checked {
62-
@include checkbox-custom-checked;
48+
// Label
49+
label {
50+
display: inline-block;
51+
font-weight: 700;
6352
}
6453

65-
/*
66-
--------------------
67-
For complianz plugin
68-
--------------------
54+
// Custom select
55+
select {
56+
@include select-custom;
57+
}
6958

70-
*:not(.cmplz-banner-checkbox) > & {
59+
input[type="checkbox"],
60+
input[type="radio"] {
7161
@include checkbox-custom;
7262

7363
&:checked {
7464
@include checkbox-custom-checked;
7565
}
76-
}
77-
*/
78-
}
7966

80-
input[type="radio"] {
81-
@include radio-custom(true);
67+
/*
68+
--------------------
69+
For complianz plugin
70+
--------------------
8271
83-
/*
84-
--------------------
85-
For complianz plugin
86-
--------------------
72+
*:not(.cmplz-banner-checkbox) > & {
73+
@include checkbox-custom;
8774
88-
*:not(.cmplz-banner-checkbox) > & {
75+
&:checked {
76+
@include checkbox-custom-checked;
77+
}
78+
}
79+
*/
80+
}
81+
82+
input[type="radio"] {
8983
@include radio-custom(true);
84+
85+
/*
86+
--------------------
87+
For complianz plugin
88+
--------------------
89+
90+
*:not(.cmplz-banner-checkbox) > & {
91+
@include radio-custom(true);
92+
}
93+
*/
9094
}
91-
*/
92-
}
9395

94-
input[type="submit"] {
95-
@extend %button-block;
96-
}
96+
input[type="submit"] {
97+
@extend %button-block;
98+
}
9799

98-
input[type="reset"] {
99-
@extend %button-block-outline;
100+
input[type="reset"] {
101+
@extend %button-block-outline;
102+
}
100103
}

0 commit comments

Comments
 (0)