overleaf/services/web/frontend/stylesheets/bootstrap-5/components/card.scss

177 lines
3.1 KiB
SCSS
Raw Normal View History

.card {
--bs-card-bg: var(--white);
--bs-card-border-width: 0;
--bs-card-border-radius: var(--border-radius-base);
--bs-card-spacer-x: var(--spacing-08);
--bs-card-spacer-y: var(--spacing-08);
.card-body {
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
&.card-dark-green-bg {
background: var(--dark-jungle-green);
border-radius: var(--border-radius-large);
color: var(--green-10);
.card-body {
padding: var(--spacing-09);
}
a:not(.btn) {
color: var(--green-30);
&:hover {
color: var(--green-30);
}
}
h1,
h2,
h3,
h4,
h5,
p {
color: var(--green-10);
}
}
&.card-purple-top-border {
background-color: white;
border-radius: var(--border-radius-medium);
box-shadow:
0 2px 4px 0 #1e253014,
0 4px 12px 0 #1e25301f;
border-top: 8px solid var(--sapphire-blue);
.card-body {
padding: var(--spacing-09) var(--spacing-10);
}
}
&.card-premium-border {
h1,
h2,
h3,
h4,
h5 {
color: var(--blue-60);
}
border-radius: var(--spacing-04);
border: 2px solid transparent;
background:
linear-gradient(white, white) padding-box,
linear-gradient(to right, var(--blue-40), #254c84, var(--blue-70))
border-box;
.card-body {
padding: var(--spacing-10);
}
.btn {
width: 100%;
}
}
&.card-pattern {
border-radius: var(--border-radius-medium);
color: var(--white);
text-align: center;
background-size: cover;
background-image: linear-gradient(
to right,
rgba(0 0 0 / 40%) 0%,
var(--dark-jungle-green) 25%,
var(--dark-jungle-green) 75%,
rgba(0 0 0 / 40%) 100%
),
url('../../../../public/img/website-redesign/overleaf-pattern-purple.png');
h2 {
@include heading-lg;
}
p {
@include body-lg;
}
h1,
h2,
h3,
h4,
h5,
p {
color: var(--white);
}
.card-body {
padding: var(--spacing-13);
}
}
&.card-pattern-left-only {
border-radius: var(--border-radius-medium);
color: var(--white);
background-size: cover;
background-image: linear-gradient(
to right,
rgba(0 0 0 / 40%) 0%,
var(--dark-jungle-green) 20%,
var(--dark-jungle-green) 100%
),
url('../../../../public/img/website-redesign/overleaf-pattern-purple.png');
h2 {
@include heading-lg;
}
p {
@include body-lg;
}
h1,
h2,
h3,
h4,
h5,
p {
color: var(--white);
}
.card-body {
padding: var(--spacing-13);
}
}
&.card-grey-border {
background-color: white;
border-radius: var(--border-radius-medium);
border: 2px solid var(--neutral-20);
.card-body {
padding: var(--spacing-10);
}
}
&.card-green-border {
background-color: white;
border-radius: var(--border-radius-medium);
border: 2px solid var(--green-50);
.card-body {
padding: var(--spacing-09);
}
}
}
[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
.card-gray {
background-color: var(--neutral-10);
}