PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.0.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.0.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 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / assets / css / frontend / plans.css

plans.css in Subscriptions for WooCommerce with Stripe Recurring Payments 2.0.0, at assets/css/frontend/plans.css

218 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Storefront plan selector styles — base (free).
3 *
4 * A radio card per plan group; the group's terms render as pill buttons with a
5 * billing note beneath. This is the shared base used by both plugins: Pro reuses
6 * this stylesheet and layers a small discount-badge overlay on top of it.
7 *
8 * Override-friendly: tunable values are CSS custom properties on `.subscrpt-buybox`,
9 * every rule is a single low-specificity class, and nothing uses `!important`.
10 */
11
12 .subscrpt-buybox {
13 --subscrpt-line: #e2e4e7;
14 --subscrpt-accent: #2271b1;
15 --subscrpt-muted: #6a6f76;
16 --subscrpt-surface: #fff;
17 --subscrpt-selected-bg: #f7fbff;
18 --subscrpt-radius: 10px;
19 display: flex;
20 flex-direction: column;
21 gap: 12px;
22 margin: 0 0 22px;
23 max-width: 540px;
24 }
25
26 .subscrpt-buybox__card {
27 position: relative;
28 display: flex;
29 flex-direction: column;
30 padding: 16px 18px;
31 border: 1px solid var(--subscrpt-line);
32 border-radius: var(--subscrpt-radius);
33 background: var(--subscrpt-surface);
34 cursor: pointer;
35 transition:
36 border-color 0.15s ease,
37 box-shadow 0.15s ease,
38 background 0.15s ease;
39 }
40
41 .subscrpt-buybox__card:hover {
42 border-color: #c3c4c7;
43 }
44
45 .subscrpt-buybox__card.is-selected {
46 border-color: var(--subscrpt-accent);
47 box-shadow: 0 0 0 1px var(--subscrpt-accent);
48 background: var(--subscrpt-selected-bg);
49 }
50
51 /* Show focus on the whole card instead of the default square outline on the
52 radio (removed below) — keeps keyboard focus visible without the box. */
53 .subscrpt-buybox__card:focus-within {
54 border-color: var(--subscrpt-accent);
55 box-shadow: 0 0 0 1px var(--subscrpt-accent);
56 }
57
58 /* Radio + control on one centered row so they line up. */
59 .subscrpt-buybox__head {
60 display: flex;
61 align-items: center;
62 gap: 10px;
63 }
64
65 .subscrpt-buybox__radio {
66 flex: 0 0 auto;
67 width: 18px;
68 height: 18px;
69 margin: 0;
70 accent-color: var(--subscrpt-accent);
71 }
72
73 .subscrpt-buybox__radio:focus {
74 outline: none;
75 box-shadow: none;
76 }
77
78 .subscrpt-buybox__label {
79 font-weight: 600;
80 font-size: 16px;
81 }
82
83 /* One-Time card (Pro) — name on the left, price on the right. */
84 .subscrpt-buybox__price {
85 margin-left: auto;
86 white-space: nowrap;
87 font-size: 16px;
88 }
89
90 .subscrpt-buybox__price del {
91 margin-right: 6px;
92 color: var(--subscrpt-muted);
93 font-weight: 400;
94 text-decoration: line-through;
95 }
96
97 .subscrpt-buybox__price ins {
98 font-weight: 700;
99 text-decoration: none;
100 }
101
102 /* Term options as pill buttons, aligned under the head (past the radio). */
103 .subscrpt-buybox__terms {
104 display: flex;
105 flex-wrap: wrap;
106 gap: 8px;
107 margin-top: 10px;
108 padding-left: 28px;
109 }
110
111 .subscrpt-buybox__term {
112 flex: 1 1 0;
113 appearance: none;
114 -webkit-appearance: none;
115 cursor: pointer;
116 padding: 8px 16px;
117 border: 1px solid var(--subscrpt-line);
118 border-radius: 6px;
119 background: var(--subscrpt-surface);
120 color: inherit;
121 font-size: 13px;
122 font-weight: 500;
123 line-height: 1.4;
124 text-align: center;
125 transition:
126 border-color 0.15s ease,
127 background 0.15s ease,
128 color 0.15s ease,
129 box-shadow 0.15s ease;
130 }
131
132 .subscrpt-buybox__term:hover {
133 border-color: var(--subscrpt-accent);
134 background: var(--subscrpt-selected-bg);
135 }
136
137 .subscrpt-buybox__term:focus {
138 outline: none;
139 }
140
141 .subscrpt-buybox__term:focus-visible {
142 outline: none;
143 border-color: var(--subscrpt-accent);
144 box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25);
145 }
146
147 .subscrpt-buybox__term.is-active {
148 border-color: var(--subscrpt-accent);
149 background: var(--subscrpt-accent);
150 color: #fff;
151 font-weight: 600;
152 }
153
154 .subscrpt-buybox__term.is-active:hover {
155 background: var(--subscrpt-accent);
156 }
157
158 /* A duration only looks chosen inside the selected card. Picking another card —
159 One Time Purchase, say — leaves this card's duration marked `is-active` in the
160 markup, so it comes back if the card is picked again, but it must not look
161 selected while another card is. */
162 .subscrpt-buybox__card:not(.is-selected) .subscrpt-buybox__term.is-active {
163 border-color: var(--subscrpt-line);
164 background: var(--subscrpt-surface);
165 color: inherit;
166 font-weight: 500;
167 }
168
169 .subscrpt-buybox__card:not(.is-selected) .subscrpt-buybox__term.is-active:hover {
170 border-color: var(--subscrpt-accent);
171 background: var(--subscrpt-selected-bg);
172 }
173
174 /* Note aligns under the control, past the radio; sits close under the name. */
175 .subscrpt-buybox__note {
176 padding-left: 28px;
177 color: var(--subscrpt-muted);
178 font-size: 13px;
179 }
180
181 /* Struck-through regular price beside the discounted price in the note. */
182 .subscrpt-buybox__note del {
183 margin-right: 4px;
184 text-decoration: line-through;
185 opacity: 0.7;
186 }
187
188 /* Variable products (Pro) render an empty container until a variation is chosen. */
189 .subscrpt-buybox__placeholder {
190 margin: 0;
191 padding: 16px 18px;
192 border: 1px dashed var(--subscrpt-line);
193 border-radius: var(--subscrpt-radius);
194 color: var(--subscrpt-muted);
195 font-size: 14px;
196 }
197
198 /* Discount badge — the card is already position: relative above. */
199 .subscrpt-buybox {
200 --subscrpt-badge-bg: var(--subscrpt-accent);
201 --subscrpt-badge-text: #fff;
202 }
203
204 .subscrpt-buybox__badge {
205 position: absolute;
206 top: -12px;
207 right: 14px;
208 z-index: 1;
209 padding: 3px 11px;
210 border-radius: 999px;
211 background: var(--subscrpt-badge-bg);
212 color: var(--subscrpt-badge-text);
213 font-size: 11px;
214 font-weight: 600;
215 line-height: 1.5;
216 white-space: nowrap;
217 }
218