|
1 | | -.mc4wp-form input[name^="_mc4wp_honey"] { display: none !important; } |
| 1 | +/* Mailchimp for WP - Form Reset */ |
2 | 2 |
|
3 | | -/* Mailchimp for WP - Default Form Styles */ |
4 | | -.mc4wp-form-basic { |
5 | | - margin: 1em 0; |
6 | | -} |
7 | | - |
8 | | -.mc4wp-form-basic label, |
9 | | -.mc4wp-form-basic input { |
10 | | - width: auto; |
11 | | - box-sizing: border-box; |
12 | | - cursor: auto; |
13 | | - height: auto; |
14 | | - vertical-align: baseline; |
15 | | - line-height: normal; |
| 3 | +/* Hide honeypot field */ |
| 4 | +.mc4wp-form input[name^="_mc4wp_honey"] { |
| 5 | + display: none !important; |
16 | 6 | } |
17 | 7 |
|
18 | | -.mc4wp-form-basic label:after, |
19 | | -.mc4wp-form-basic input:after { |
20 | | - content: ""; |
21 | | - display: table; |
22 | | - clear: both; |
| 8 | +/* Zero-specificity reset via :where() — themes/plugins always win */ |
| 9 | +:where(.mc4wp-form) { |
| 10 | + margin: 1em 0; |
23 | 11 | } |
24 | 12 |
|
25 | | -.mc4wp-form-basic label { |
| 13 | +:where(.mc4wp-form label) { |
| 14 | + display: block; |
26 | 15 | font-weight: bold; |
27 | 16 | margin-bottom: 6px; |
28 | | - display: block; |
29 | | -} |
30 | | - |
31 | | -/* OLD STYLE: When input is a sibling (not nested) */ |
32 | | -.mc4wp-form-basic label + input { |
33 | | - display: block; |
34 | 17 | } |
35 | 18 |
|
36 | | -/* NEW STYLE: When input is nested inside label */ |
37 | | -.mc4wp-form-basic label > input { |
| 19 | +:where(.mc4wp-form label > input), |
| 20 | +:where(.mc4wp-form label > textarea), |
| 21 | +:where(.mc4wp-form label > select) { |
38 | 22 | display: block; |
39 | 23 | margin-top: 6px; |
40 | 24 | font-weight: normal; |
41 | 25 | } |
42 | 26 |
|
43 | | -/* Form Elements */ |
44 | | -.mc4wp-form-basic input[type="text"], |
45 | | -.mc4wp-form-basic input[type="email"], |
46 | | -.mc4wp-form-basic input[type="tel"], |
47 | | -.mc4wp-form-basic input[type="url"], |
48 | | -.mc4wp-form-basic input[type="date"], |
49 | | -.mc4wp-form-basic textarea, |
50 | | -.mc4wp-form-basic select { |
51 | | - min-height: 32px; |
| 27 | +:where(.mc4wp-form input[type="text"]), |
| 28 | +:where(.mc4wp-form input[type="email"]), |
| 29 | +:where(.mc4wp-form input[type="tel"]), |
| 30 | +:where(.mc4wp-form input[type="url"]), |
| 31 | +:where(.mc4wp-form input[type="date"]), |
| 32 | +:where(.mc4wp-form textarea), |
| 33 | +:where(.mc4wp-form select) { |
| 34 | + box-sizing: border-box; |
52 | 35 | width: 100%; |
53 | 36 | max-width: 480px; |
| 37 | + min-height: 32px; |
54 | 38 | } |
55 | 39 |
|
56 | | -.mc4wp-form-basic input[type="number"] { |
| 40 | +:where(.mc4wp-form input[type="number"]) { |
57 | 41 | min-width: 40px; |
58 | 42 | } |
59 | 43 |
|
60 | | -.mc4wp-form-basic input[type="checkbox"], |
61 | | -.mc4wp-form-basic input[type="radio"] { |
62 | | - position: relative; |
63 | | - margin: 0 6px 0 0; |
64 | | - padding: 0; |
65 | | - height: 13px; |
66 | | - width: 13px; |
67 | | - display: inline-block; |
68 | | - border: 0; |
69 | | -} |
70 | | - |
71 | | -/* NEW STYLE: Checkbox/radio nested in label - override inline-block */ |
72 | | -.mc4wp-form-basic label > input[type="checkbox"], |
73 | | -.mc4wp-form-basic label > input[type="radio"] { |
| 44 | +:where(.mc4wp-form input[type="checkbox"]), |
| 45 | +:where(.mc4wp-form input[type="radio"]) { |
74 | 46 | display: inline-block; |
75 | | - margin-top: 0; |
| 47 | + margin-block: 0; |
| 48 | + margin-inline-end: 6px; |
76 | 49 | } |
77 | 50 |
|
78 | | -.mc4wp-form-basic input[type="checkbox"] { |
79 | | - appearance: checkbox; |
80 | | -} |
81 | | - |
82 | | -.mc4wp-form-basic input[type="radio"] { |
83 | | - appearance: radio; |
84 | | -} |
85 | | - |
86 | | -.mc4wp-form-basic input[type="submit"], |
87 | | -.mc4wp-form-basic button, |
88 | | -.mc4wp-form-basic input[type="button"] { |
| 51 | +:where(.mc4wp-form input[type="submit"]), |
| 52 | +:where(.mc4wp-form button) { |
89 | 53 | cursor: pointer; |
90 | 54 | display: inline-block; |
91 | 55 | appearance: none; |
92 | 56 | } |
93 | 57 |
|
94 | | -/* Remove font-weight bold from nested elements */ |
95 | | -.mc4wp-form-basic label > span, |
96 | | -.mc4wp-form-basic li > label { |
97 | | - font-weight: normal; |
98 | | -} |
99 | | - |
100 | | -/* Alert */ |
| 58 | +/* Alert colors — functional, normal specificity */ |
101 | 59 | .mc4wp-alert { |
102 | 60 | color: #c09853; |
103 | 61 | clear: both; |
|
112 | 70 | } |
113 | 71 |
|
114 | 72 | .mc4wp-error { |
115 | | - color: #CD5C5C; |
116 | | -} |
117 | | - |
118 | | -/* Right-To-Left specific styles */ |
119 | | -.rtl .mc4wp-form-basic input[type="checkbox"], |
120 | | -.rtl .mc4wp-form-basic input[type="radio"] { |
121 | | - margin: 0 0 0 6px; |
| 73 | + color: #cd5c5c; |
122 | 74 | } |
0 commit comments