PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.3.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.3.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
subscription / assets / css / admin-settings.css

admin-settings.css in Subscriptions for WooCommerce with Stripe Recurring Payments 2.3.0, at assets/css/admin-settings.css

377 lines 10.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* Scoped toggle styles for this settings screen only */
2 .woocommerce .form-table .forminp-checkbox label {
3 display: inline-flex;
4 align-items: center;
5 gap: 10px;
6 }
7
8 .wp-subscription-toggle {
9 position: absolute;
10 opacity: 0;
11 width: 0;
12 height: 0;
13 visibility: hidden;
14 }
15
16 .wp-subscription-toggle + .wp-subscription-toggle-ui {
17 position: relative;
18 display: inline-block;
19 width: 40px;
20 height: 20px;
21 border-radius: 999px;
22 background: #cbd5e1; /* slate-300 */
23 transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
24 vertical-align: middle;
25 cursor: pointer;
26 }
27
28 .wp-subscription-toggle + .wp-subscription-toggle-ui::after {
29 content: "";
30 position: absolute;
31 top: 2px;
32 left: 2px;
33 width: 16px;
34 height: 16px;
35 border-radius: 50%;
36 background: #fff;
37 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
38 transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
39 }
40
41 .wp-subscription-toggle:checked + .wp-subscription-toggle-ui {
42 background: #2271b1; /* WP primary */
43 }
44
45 .wp-subscription-toggle:checked + .wp-subscription-toggle-ui::after {
46 transform: translateX(20px);
47 }
48
49 .wp-subscription-toggle:focus + .wp-subscription-toggle-ui {
50 outline: none;
51 outline-offset: 0;
52 }
53
54 .wp-subscription-toggle:disabled + .wp-subscription-toggle-ui {
55 background: #e5e7eb; /* gray-200 */
56 cursor: not-allowed;
57 }
58
59 /* Consistent minimum widths for inputs/selects on this screen */
60 .woocommerce .form-table td input[type="text"],
61 .woocommerce .form-table td input[type="number"],
62 .woocommerce .form-table td select,
63 .woocommerce .form-table td .select2-container .select2-selection--single {
64 min-width: 25em;
65 }
66
67 /* Ensure Select2 container reflects min width nicely */
68 .woocommerce .form-table td .select2-container {
69 min-width: 25em !important;
70 }
71
72 /* Minimal, consistent spacing and typography */
73 .woocommerce .woocommerce-card {
74 background: #fff;
75 border: 1px solid #e5e7eb;
76 border-radius: 8px;
77 padding: 16px 20px;
78 }
79
80 .woocommerce .form-table th label {
81 font-weight: 600;
82 }
83
84 .woocommerce .form-table tr {
85 border-bottom: 1px solid #f1f5f9;
86 }
87
88 .woocommerce .form-table th,
89 .woocommerce .form-table td {
90 padding-top: 14px;
91 padding-bottom: 14px;
92 }
93
94 .woocommerce .form-table p.description {
95 color: #64748b; /* slate-500 */
96 margin-top: 6px;
97 line-height: 1.5;
98 }
99
100 /* Inputs/selects: subtle, consistent look */
101 .woocommerce .form-table td input[type="text"],
102 .woocommerce .form-table td input[type="number"],
103 .woocommerce .form-table td select {
104 padding: 6px 10px;
105 min-height: 34px;
106 border-radius: 6px;
107 border: 1px solid #d0d7de;
108 transition: all 0.15s cubic-bezier(0.27, 0.2, 0.25, 1.2);
109 }
110
111 .woocommerce .form-table td input[type="text"]:focus,
112 .woocommerce .form-table td input[type="number"]:focus,
113 .woocommerce .form-table td select:focus {
114 outline: none;
115 border-color: #2271b1;
116 box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
117 }
118
119 /* Select2 alignment with inputs */
120 .woocommerce .form-table td .select2-container .select2-selection--single {
121 height: 34px;
122 border-radius: 6px;
123 border-color: #d0d7de;
124 }
125
126 .woocommerce .form-table td .select2-container--default .select2-selection--single .select2-selection__rendered {
127 line-height: 34px;
128 }
129
130 .woocommerce .form-table td .select2-container--default .select2-selection--single .select2-selection__arrow {
131 height: 34px;
132 }
133
134 /* Buttons: match input height and visual rhythm */
135 .woocommerce .form-table td .button,
136 .woocommerce .form-table td .button-primary,
137 .woocommerce .form-table td .button-secondary,
138 .woocommerce .woocommerce-card .button,
139 .woocommerce .woocommerce-card .button-primary,
140 .woocommerce .woocommerce-card .button-secondary,
141 .woocommerce .form-table td .button-large,
142 .woocommerce .woocommerce-card .button-large {
143 min-height: 34px;
144 line-height: 32px; /* 34px height minus 1px border top/bottom */
145 padding: 4px 12px;
146 border-radius: 6px;
147 }
148
149 /* Switch Fee type picker: shrink to its content instead of filling the row. */
150 .subscrpt-switch-fee-type .wpsubs-adv-select__trigger {
151 width: max-content;
152 min-width: unset;
153 }
154
155 /* Retention offer discount type picker: same as the Switch Fee one. */
156 .subscrpt-offer-type .wpsubs-adv-select__trigger {
157 width: max-content;
158 min-width: unset;
159 }
160
161 /* ──────────────────────────────────────────────────────────────────────────
162 Page header — the title/description/rule use the shared inline markup from
163 the other admin pages (see views/settings.php). Only the Save button keeps a
164 class, so it doesn't stretch in the flex title row.
165 ────────────────────────────────────────────────────────────────────────── */
166
167 .subscrpt-settings__save {
168 flex: 0 0 auto;
169 }
170
171 /* ──────────────────────────────────────────────────────────────────────────
172 Rail and panels
173 Every panel is in the DOM on every request, because the form posts to
174 options.php and an unrendered field is a field that saves nothing.
175 ────────────────────────────────────────────────────────────────────────── */
176
177 .subscrpt-settings__layout {
178 display: grid;
179 grid-template-columns: 216px minmax(0, 1fr);
180 gap: 20px;
181 align-items: start;
182 }
183
184 /* The rail and the panel share a top edge, but their text does not: a field
185 label sits under the card's 1px border and 20px padding, a rail label under
186 the item's own 7px. The 14px difference is that gap closed, so the first
187 section name and the first setting's label land on the same line. */
188 .subscrpt-settings__sidebar {
189 position: sticky;
190 top: 104px;
191 padding-top: 14px;
192 max-height: calc(100vh - 140px);
193 overflow-y: auto;
194 overscroll-behavior: contain;
195 }
196
197 /* The sidebar rail itself is the reusable `wpsubs-vnav` component
198 (admin-components/vnav.css); only its placement lives here. */
199
200 /* Stacks the panels in the `All` category, and holds a single one otherwise. */
201 .subscrpt-settings__panels {
202 display: flex;
203 flex-direction: column;
204 gap: 16px;
205 }
206
207 .subscrpt-settings__panel {
208 padding: 20px 24px;
209 }
210
211 /* The `hidden` attribute is only a user-agent `display: none`, so any class
212 that sets `display` beats it. Panels carry `wpsubs-table-card`, so say it
213 again with the weight the attribute cannot bring on its own. */
214 .subscrpt-settings__panel[hidden] {
215 display: none !important;
216 }
217
218 .subscrpt-settings__rule {
219 border-top: 1px solid var(--wpsubs-border, #f1f5f9);
220 margin: 16px 0;
221 }
222
223 @media screen and (max-width: 960px) {
224 .subscrpt-settings__layout {
225 grid-template-columns: minmax(0, 1fr);
226 }
227
228 .subscrpt-settings__sidebar {
229 position: static;
230 max-height: none;
231 overflow: visible;
232 }
233
234 .subscrpt-settings__sidebar .wpsubs-vnav {
235 flex-direction: row;
236 flex-wrap: wrap;
237 }
238 }
239
240 /* --------------------------------------------------------------------------
241 Cancellation Flow
242
243 A wide tab panel with an options rail beside it. Deliberately not the
244 settings layout above: that one leads with a 216px nav rail and makes its
245 sidebar sticky and scrollable, which is right for navigation and wrong for
246 a panel of fields.
247 -------------------------------------------------------------------------- */
248 .subscrpt-flow__layout {
249 display: grid;
250 grid-template-columns: minmax(0, 1fr) 340px;
251 gap: 20px;
252 align-items: start;
253 }
254
255 @media (max-width: 960px) {
256 .subscrpt-flow__layout {
257 grid-template-columns: minmax(0, 1fr);
258 }
259 }
260
261 /* The options rail is far narrower than a settings panel, so its fields stack
262 rather than using the shared 220px label / 260px control row, which needs
263 about 500px before it fits. */
264 .subscrpt-flow__options .wpsubs-settings-field {
265 flex-direction: column;
266 gap: 8px;
267 }
268
269 .subscrpt-flow__options .wpsubs-settings-field + .wpsubs-settings-field {
270 margin-top: 18px;
271 }
272
273 .subscrpt-flow__options .wpsubs-settings-field__label {
274 flex: 0 0 auto;
275 }
276
277 .subscrpt-flow__options .wpsubs-settings-field__control .wpsubs-input,
278 .subscrpt-flow__options .wpsubs-settings-field__control .wpsubs-select,
279 .subscrpt-flow__options .wpsubs-settings-field__control .wpsubs-adv-select__trigger {
280 min-width: 0;
281 max-width: 100%;
282 width: 100%;
283 }
284
285 /* Both panels share one padding rhythm so the two columns line up. */
286 .subscrpt-flow__panel {
287 padding: 20px;
288 }
289
290 /* The saved reason list: the same row treatment the manage modal uses, so the
291 page and the modal read as one thing. Numbered, because the order is what a
292 customer sees. */
293 .subscrpt-flow__reasons {
294 list-style: none;
295 margin: 0 0 18px;
296 padding: 0;
297 counter-reset: subscrpt-reason;
298 }
299
300 .subscrpt-flow__reasons li {
301 display: flex;
302 align-items: center;
303 gap: 12px;
304 padding: 10px 14px;
305 border: 1px solid var(--wpsubs-border, #e5e7eb);
306 border-radius: var(--wpsubs-radius-sm, 5px);
307 background: var(--wpsubs-surface, #fff);
308 font-size: 13px;
309 color: var(--wpsubs-text, #374151);
310 }
311
312 .subscrpt-flow__reasons li + li {
313 margin-top: 8px;
314 }
315
316 .subscrpt-flow__reasons li::before {
317 counter-increment: subscrpt-reason;
318 content: counter(subscrpt-reason);
319 flex: 0 0 auto;
320 display: inline-flex;
321 align-items: center;
322 justify-content: center;
323 width: 22px;
324 height: 22px;
325 border-radius: 999px;
326 background: var(--wpsubs-surface-muted, #f9fafb);
327 color: var(--wpsubs-text-muted, #6b7280);
328 font-size: 11px;
329 font-weight: 600;
330 }
331
332 /* "Other" is not one of the store's reasons: the survey adds it while the
333 comment box is on. Shown in its place, but visibly not editable. */
334 .subscrpt-flow__reasons li.subscrpt-flow__reason--auto {
335 border-style: dashed;
336 background: var(--wpsubs-surface-muted, #f9fafb);
337 color: var(--wpsubs-text-muted, #6b7280);
338 }
339
340 .subscrpt-flow__reason-note {
341 margin-left: auto;
342 font-size: 12px;
343 color: var(--wpsubs-text-subtle, #9ca3af);
344 }
345
346 /* Shown once the list has been edited and not yet saved. */
347 .subscrpt-flow__unsaved {
348 font-size: 13px;
349 color: var(--wpsubs-text-muted, #6b7280);
350 }
351
352 .subscrpt-flow__empty {
353 margin: 0 0 18px;
354 color: var(--wpsubs-text-subtle, #9ca3af);
355 font-size: 13px;
356 }
357
358 /* The reasons control carries no label of its own - the tab names the panel.
359 The label element is still emitted (with whitespace, so `:empty` never
360 matches) and its `flex: 0 0 220px` becomes a 220px tall gap once the row
361 stacks, so hide it outright. */
362 .subscrpt-flow__panel--reasons .wpsubs-settings-field {
363 flex-direction: column;
364 gap: 10px;
365 }
366
367 .subscrpt-flow__panel--reasons .wpsubs-settings-field__label {
368 display: none;
369 }
370
371 .subscrpt-flow__note {
372 margin: 18px 0 0;
373 color: var(--wpsubs-text-muted, #6b7280);
374 font-size: 12px;
375 line-height: 1.6;
376 }
377