|
62 | 62 | } |
63 | 63 | } |
64 | 64 |
|
65 | | -.PricingOptions__labels { |
66 | | - display: none; |
| 65 | +.PricingOptions__label-cell { |
| 66 | + grid-row: labels; |
| 67 | + justify-self: stretch; |
67 | 68 | } |
68 | 69 |
|
69 | | -@media (min-width: 63.25rem) { |
70 | | - .PricingOptions__labels { |
71 | | - --brand-pricing-options-column-count: 1; |
| 70 | +.PricingOptions__label-cell--empty { |
| 71 | + display: none; |
| 72 | +} |
72 | 73 |
|
73 | | - display: grid; |
74 | | - grid-column: 1 / -1; |
75 | | - grid-row: labels; |
76 | | - grid-template-columns: repeat(var(--brand-pricing-options-column-count), minmax(0, 1fr)); |
77 | | - column-gap: var(--brand-pricing-options-item-gap, 0); |
78 | | - } |
| 74 | +.PricingOptions__label-cell--has-label { |
| 75 | + display: flex; |
| 76 | + align-items: center; |
| 77 | + margin-inline: calc(var(--brand-pricing-options-item-padding-inline, 0px) * -1); |
| 78 | + margin-block-end: var(--base-size-16); |
| 79 | + padding-inline: var(--brand-pricing-options-item-padding-inline, 0px); |
| 80 | + padding-block-end: var(--base-size-16); |
| 81 | + border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle); |
| 82 | +} |
79 | 83 |
|
| 84 | +@media (min-width: 63.25rem) { |
80 | 85 | .PricingOptions__label-cell { |
81 | 86 | position: relative; |
82 | 87 | display: flex; |
83 | 88 | align-items: center; |
84 | 89 | min-height: var(--base-size-54); |
| 90 | + margin-block-end: 0; |
85 | 91 | padding-block: var(--base-size-16); |
| 92 | + border-block-end: 0; |
86 | 93 | background-color: var(--brand-PricingOptions-item-bgColor-solid); |
| 94 | + transform: translateY(calc(var(--brand-pricing-options-item-padding-block-start, 0px) * -1)); |
87 | 95 | } |
88 | 96 |
|
89 | 97 | /* Accent top border — uses ::after so it can overflow into the column gap */ |
90 | 98 | .PricingOptions__label-cell--has-label::after { |
91 | 99 | content: ''; |
92 | 100 | position: absolute; |
93 | 101 | inset-block-start: 0; |
94 | | - inset-inline-start: calc(var(--brand-pricing-options-item-gap, 0px) / 2 * -1); |
95 | | - inset-inline-end: calc(var(--brand-pricing-options-item-gap, 0px) / 2 * -1); |
| 102 | + inset-inline: 0; |
96 | 103 | height: var(--brand-borderWidth-thin); |
97 | 104 | background-color: var(--brand-color-text-emphasized); |
98 | 105 | z-index: 1; |
99 | 106 | } |
100 | 107 |
|
101 | | - /* First cell: don't overflow past container start (cards override below) */ |
102 | | - .PricingOptions__label-cell--has-label:first-child::after { |
103 | | - inset-inline-start: 0; |
104 | | - } |
105 | | - |
106 | | - /* Last cell: don't overflow past container end (cards override below) */ |
107 | | - .PricingOptions__label-cell--has-label:last-child::after { |
108 | | - inset-inline-end: 0; |
109 | | - } |
110 | | - |
111 | | - .PricingOptions--layout-default .PricingOptions__label-cell--has-label::after { |
112 | | - inset-inline-start: 0; |
113 | | - inset-inline-end: 0; |
114 | | - } |
115 | | - |
116 | 108 | /* ---- Default layout labels ---- */ |
117 | 109 |
|
118 | | - /* Continuous bottom border across entire labels row — uses ::after to extend into container padding */ |
119 | | - .PricingOptions--layout-default .PricingOptions__labels { |
120 | | - position: relative; |
121 | | - } |
122 | | - |
123 | | - .PricingOptions--layout-default .PricingOptions__labels::after { |
124 | | - content: ''; |
125 | | - position: absolute; |
126 | | - inset-block-end: 0; |
127 | | - inset-inline-start: calc(var(--brand-pricing-options-container-padding-inline, 0px) * -1); |
128 | | - inset-inline-end: calc(var(--brand-pricing-options-container-padding-inline, 0px) * -1); |
129 | | - height: var(--brand-borderWidth-thin); |
130 | | - background-color: var(--brand-color-border-subtle); |
131 | | - } |
132 | | - |
133 | 110 | .PricingOptions--layout-default .PricingOptions__label-cell { |
134 | 111 | margin-inline: calc(var(--brand-pricing-options-item-gap) / 2 * -1); |
135 | 112 | padding-inline: calc(var(--brand-pricing-options-item-gap) / 2); |
| 113 | + border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle); |
136 | 114 | } |
137 | 115 |
|
138 | | - .PricingOptions--layout-default .PricingOptions__label-cell:first-child { |
| 116 | + .PricingOptions--layout-default .PricingOptions__item:first-child .PricingOptions__label-cell { |
139 | 117 | margin-inline-start: calc(var(--brand-pricing-options-container-padding-inline) * -1); |
140 | 118 | padding-inline-start: var(--brand-pricing-options-container-padding-inline); |
141 | 119 | } |
142 | 120 |
|
143 | | - .PricingOptions--layout-default .PricingOptions__label-cell:last-child { |
| 121 | + .PricingOptions--layout-default .PricingOptions__item:last-child .PricingOptions__label-cell { |
144 | 122 | margin-inline-end: calc(var(--brand-pricing-options-container-padding-inline) * -1); |
145 | 123 | padding-inline-end: var(--brand-pricing-options-container-padding-inline); |
146 | 124 | } |
|
151 | 129 | border-block-start-color: transparent; |
152 | 130 | } |
153 | 131 |
|
154 | | - /* Vertical dividers between label cells, centered in the gap */ |
155 | | - .PricingOptions--layout-default .PricingOptions__label-cell + .PricingOptions__label-cell::before { |
| 132 | + /* Vertical dividers between label cells, centered in the column gap */ |
| 133 | + .PricingOptions--layout-default .PricingOptions__item + .PricingOptions__item .PricingOptions__label-cell::before { |
156 | 134 | content: ''; |
157 | 135 | position: absolute; |
158 | 136 | inset-block: 0; |
159 | | - width: var(--brand-borderWidth-thin); |
160 | 137 | inset-inline-start: 0; |
| 138 | + width: var(--brand-borderWidth-thin); |
161 | 139 | background-color: var(--brand-color-border-subtle); |
162 | 140 | } |
163 | 141 |
|
164 | 142 | .PricingOptions--layout-default.PricingOptions--appearance-gradient |
165 | | - .PricingOptions__label-cell |
166 | | - + .PricingOptions__label-cell::before { |
| 143 | + .PricingOptions__item |
| 144 | + + .PricingOptions__item |
| 145 | + .PricingOptions__label-cell::before { |
167 | 146 | mask-image: var(--brand-PricingOptions-borderMask); |
168 | 147 | } |
169 | 148 |
|
170 | 149 | /* ---- Cards layout labels ---- */ |
171 | 150 |
|
172 | 151 | .PricingOptions--layout-cards .PricingOptions__label-cell { |
| 152 | + margin-inline: calc(var(--brand-pricing-options-item-padding-inline) * -1); |
173 | 153 | padding-inline: var(--base-size-28); |
174 | 154 | border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle); |
175 | | - /* border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted); */ |
176 | 155 | } |
177 | 156 |
|
178 | 157 | .PricingOptions--layout-cards .PricingOptions__label-cell--empty { |
|
228 | 207 |
|
229 | 208 | .PricingOptions--layout-default .PricingOptions__item { |
230 | 209 | --brand-pricing-options-item-padding-inline: var(--base-size-24); |
| 210 | + --brand-pricing-options-item-padding-block-start: var(--base-size-20); |
231 | 211 |
|
232 | 212 | position: relative; /* Used for positioning the divider between items */ |
233 | 213 | padding-inline: var(--base-size-24); |
|
272 | 252 | @media (min-width: 63.25rem) { |
273 | 253 | .PricingOptions--layout-default .PricingOptions__item { |
274 | 254 | --brand-pricing-options-item-padding-inline: 0; |
| 255 | + --brand-pricing-options-item-padding-block-start: var(--base-size-40); |
275 | 256 |
|
276 | 257 | padding-inline: 0; |
277 | 258 | padding-block: var(--base-size-40); |
|
311 | 292 |
|
312 | 293 | .PricingOptions--layout-cards .PricingOptions__item { |
313 | 294 | --brand-pricing-options-item-padding-inline: var(--base-size-32); |
| 295 | + --brand-pricing-options-item-padding-block-start: var(--base-size-32); |
314 | 296 |
|
315 | 297 | position: relative; |
316 | 298 | padding-inline: var(--base-size-32); |
|
368 | 350 |
|
369 | 351 | @media (min-width: 63.25rem) { |
370 | 352 | .PricingOptions__item { |
371 | | - grid-row: header / footnote; |
| 353 | + grid-row: labels / footnote; |
372 | 354 | grid-template-rows: subgrid; |
373 | 355 | } |
374 | 356 |
|
375 | 357 | .PricingOptions__item--has-leading-component { |
376 | | - grid-row: leadingComponent / footnote; |
| 358 | + grid-row: labels / footnote; |
377 | 359 | } |
378 | 360 | } |
379 | 361 |
|
|
640 | 622 | /* First item: don't overflow past container start */ |
641 | 623 | .PricingOptions--layout-default |
642 | 624 | .PricingOptions__item:first-child |
643 | | - :is(.PricingOptions__price, .PricingOptions__feature-list--has-divider)::before, |
644 | | - .PricingOptions--layout-default |
645 | | - .PricingOptions__labels |
646 | | - + .PricingOptions__item |
647 | 625 | :is(.PricingOptions__price, .PricingOptions__feature-list--has-divider)::before { |
648 | 626 | inset-inline-start: calc(var(--brand-pricing-options-container-padding-inline, 0px) * -1); |
649 | 627 | } |
|
0 commit comments