overleaf/services/web/frontend/stylesheets/bootstrap-5/pages/subscription.scss

305 lines
5.1 KiB
SCSS
Raw Normal View History

[web] Migrate `/user/subscription` to BS5 (#20513) * [web] Initialize BS5 in subscription page * [web] Update subscription-dashboard.tsx for BS5 * [web] Update row-link.tsx for BS5 * [web] Update modals * [web] Add `btn` to `btn-inline-link` classes * [web] Update circle change-to-group circle price element * [web] Replace `list-item-with-margin-bottom` with `mb-3` * [web] Update form elements to BS5 * [web] Use `useContactUsModal` * [web] Adjust tables margin/padding, and more * [web] Update change-to-group-modal.tsx * [web] Add gap to subscription buttons * [web] Remove subscription page colspan for md and above * [web] Use Notification component * [web] Update "leave group" buttons * [web] Fix tests: add `ol-user` meta tag * [web] Nest .hover-highlight in #subscription-dashboard-root * [web] Update to OLRow/OLCol * [web] Update to OLButtons * [web] Update to OLFormGroup * [web] Naming: use BSversion prefix * [web] Set CancelSubscriptionButton as ghost directly in component * [web] Set "Plan" font size * [web] Simplify cancel-subscription buttons * [web] Remove `--neutral-10` ModalFooter background * [web] Simplify circle styles * [web] Center discount badge * [web] Update fieldset label * [web] Add `<ul>` around RowLink * [web] Define SCSS for row-link component * [web] Remove some use of utility classes * [web] Revert and update `fieldset` changes (fixes tests) * [web] Fixup some more OLButtons * [web] Fixup use of OLRow/OLCol * [web] Reduce spacing below "legend-as-label" * [web] Use h5 instead of small in OLModalTitle * [web] Revert OLCol removal on lg screens I had removed them by mistake because I wasn't using the proper breakpoints * [web] Add backdrop to nested modal ContactUsModal * [web] Don't prefill project URL in ContactUsModal * [web] Fix lint * [web] Share `className` prop in BS5 and BS3 modals * [web] Set sub-title font sans serif (BS3) * [web] Update remaining Alerts to OLNotification GitOrigin-RevId: 7fd975ae3e992cebfaf71d4e182f8e13ec886d09
2024-09-30 05:49:18 -04:00
/**
* MAIN CONTENT
*/
#subscription-dashboard-root {
.hover-highlight {
&:hover,
&:focus {
background-color: var(--neutral-10);
}
}
li.row-link {
display: flex;
border: 0;
padding: 0;
a {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--spacing-02) 0;
text-decoration: none;
color: var(--neutral-90);
width: 100%;
&:hover {
background-color: var(--neutral-10);
}
}
}
}
/**
* MODALS
*/
.group-subscription-modal {
.circle {
font-size: var(--font-size-06);
border-radius: 50%;
background-color: var(--green-70);
color: white;
white-space: nowrap;
height: 180px;
width: 180px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: var(--spacing-02);
font-weight: bold;
.small {
opacity: 0.85;
}
.circle-subtext {
font-size: var(--font-size-03);
}
}
.legend-as-label {
font-size: var(--font-size-02);
font-weight: 600;
color: var(--content-secondary);
margin-bottom: 0;
}
.educational-discount-badge {
height: 50px;
p {
display: inline-block;
font-weight: bold;
padding-left: var(--spacing-02);
padding-right: var(--spacing-02);
}
.applied {
background-color: rgba($green-70, 0.1);
color: var(--green-70);
}
.ineligible {
background-color: var(--neutral-10);
}
}
}
#change-plan {
table {
@include media-breakpoint-up(lg) {
th:last-child,
td:last-child {
width: 1%; // will expand to fit the content
}
}
@include media-breakpoint-down(lg) {
display: block;
thead {
display: none;
}
tbody,
td,
tr {
display: inline-block;
padding-top: 0;
padding-bottom: 0;
text-align: center;
width: 100%;
}
td:first-child {
padding-top: var(--spacing-07);
}
td:last-child {
padding-top: var(--spacing-03);
padding-bottom: var(--spacing-07);
}
tr {
border-bottom: 1px solid var(--bs-border-color);
td,
th {
border: 0 !important;
}
}
tr:last-child {
border-bottom: 0;
}
}
}
}
.payment-container {
padding-top: var(--spacing-13);
display: flex;
gap: var(--spacing-10);
justify-content: center;
@include media-breakpoint-down(lg) {
flex-direction: column;
align-items: center;
}
.payment-review-panel {
width: 339px;
@include media-breakpoint-down(lg) {
width: 100%;
}
h4 {
color: var(--neutral-70);
font-weight: 600;
@include heading-sm;
}
.price-feature-description {
color: var(--neutral-70);
font-weight: 400;
@include body-base;
h4 {
margin-bottom: var(--spacing-06);
}
.features-list {
margin-top: var(--spacing-08);
}
.price-summary {
.price-summary-line {
display: flex;
justify-content: space-between;
.price-summary-line-width {
width: 70%;
}
}
p {
margin: unset;
}
.price-nowrap {
white-space: nowrap;
}
.price-summary-total-line {
margin-top: var(--spacing-06);
.price-summary-due {
color: var(--green-50);
}
}
}
.price-cancel-anytime {
@include body-xs;
}
}
hr {
margin-top: var(--spacing-08);
margin-bottom: var(--spacing-08);
}
}
.payment-checkout {
padding: var(--spacing-08);
width: 408px;
@include media-breakpoint-down(lg) {
width: 100%;
}
h1 {
@include heading-md;
}
.student-disclaimer {
@include body-sm;
}
}
}
.group-heading {
display: flex;
align-items: center;
gap: var(--spacing-04);
margin-bottom: var(--spacing-06);
h2 {
@include heading-lg;
margin: 0;
word-break: break-all;
}
.btn-ghost {
--bs-btn-bg: transparent;
}
}
.change-currency {
.dropdown-item:not(:first-child) {
margin-top: var(--spacing-02);
}
}
.change-currency-toggle {
padding-left: 0;
text-decoration: underline;
color: var(--content-secondary);
&:hover,
&:focus,
&:active {
// !important is unfortunately necessary to override btn:first-child:active
color: var(--content-secondary) !important;
}
&:not(:hover) {
text-decoration: underline;
}
// Hide the dropdown caret, BS5 react-bootstrap does not have a prop for this
&::after {
display: none;
}
@include body-xs;
}
.change-currency-dropdown-selected-icon {
position: absolute;
right: 10px;
top: var(--bs-dropdown-item-padding-y);
}
.payment-method-toggle {
.form-check {
margin-bottom: var(--spacing-05);
}
.payment-method-logos {
display: inline-block;
margin-left: var(--spacing-05);
img:not(:last-child) {
margin-right: var(--spacing-04);
}
}
}