overleaf/services/web/frontend/stylesheets/components/card.less
Jessica Lawshe 130a04e9c2 Merge pull request #19990 from overleaf/jel-cms-pattern-cards
[web] Add new card options to CMS

GitOrigin-RevId: ca19f155a3b4da120f3e3a78800a0b0e5154468e
2024-08-22 08:05:25 +00:00

201 lines
3.7 KiB
Text

.card {
background-color: white;
border-radius: @border-radius-base;
box-shadow: none;
padding: @line-height-computed;
.page-header {
margin: 0 0 1.5625rem;
h1,
h2,
h3 {
margin-top: 0;
}
}
> .container-fluid {
padding: 0;
}
.card-header {
border-bottom: 1px solid @gray-lighter;
padding-bottom: @line-height-computed;
margin-bottom: @line-height-computed;
h2 {
margin: 0;
}
}
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
&.card-drop-shadow {
box-shadow: @card-box-shadow;
background-color: white;
> hr {
margin-left: -@line-height-computed;
margin-right: -@line-height-computed;
}
}
}
.card-thin {
padding: @line-height-computed / 2;
}
.card-group {
.card {
margin: @line-height-computed -15px 0 -15px;
border-radius: 0;
&.card-highlighted {
// Make it taller and card like
margin-top: 0;
border-radius: @border-radius-base;
}
&.card-first {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
&.card-last {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
}
}
.card-border {
border: @border-width-base solid @border-color-base;
}
.card-content {
padding: @padding-md;
}
.card-gray {
&:extend(.card);
background-color: @card-gray-bg-color;
border-radius: @card-border-radius;
}
.card-gray-dark {
&:extend(.card);
background-color: @ol-blue-gray-1;
border-radius: @card-border-radius;
}
.website-redesign {
.card {
background-color: @card-gray-bg-color;
border-radius: 24px;
}
}
.card {
&.card-dark-green-bg {
background: var(--dark-jungle-green);
border-radius: 16px;
color: var(--green-10);
padding: var(--spacing-09);
a:not(.btn) {
color: var(--green-30);
&:hover {
color: var(--green-30);
}
}
}
&.card-purple-top-border {
background-color: white;
border-radius: 8px;
box-shadow:
0px 2px 4px 0px #1e253014,
0px 4px 12px 0px #1e25301f;
border-top: 8px solid var(--sapphire-blue);
padding: 32px 40px 32px 40px;
}
&.card-premium-border {
h2,
h3,
h4 {
color: var(--blue-60);
}
border-radius: 8px;
padding: var(--spacing-10);
border: 2px solid transparent;
background:
linear-gradient(white, white) padding-box,
linear-gradient(to right, var(--blue-40), #254c84, var(--blue-70))
border-box;
.btn {
width: 100%;
}
}
&.card-pattern {
border-radius: var(--border-radius-medium-new);
color: var(--white);
padding: var(--spacing-13);
text-align: center;
background-size: cover;
background-image: linear-gradient(
to right,
rgba(0, 0, 0, 0.4) 0%,
var(--dark-jungle-green) 25%,
var(--dark-jungle-green) 75%,
rgba(0, 0, 0, 0.4) 100%
),
url('../../../public/img/website-redesign/overleaf-pattern-purple.png');
h2 {
.heading-lg();
}
p {
.body-lg();
}
h1,
h2,
h3,
h4,
h5,
p {
color: var(--white);
}
}
&.card-pattern-left-only {
border-radius: var(--border-radius-medium-new);
color: var(--white);
padding: var(--spacing-13);
background-size: cover;
background-image: linear-gradient(
to right,
rgba(0, 0, 0, 0.4) 0%,
var(--dark-jungle-green) 20%,
var(--dark-jungle-green) 100%
),
url('../../../public/img/website-redesign/overleaf-pattern-purple.png');
h2 {
.heading-lg();
}
p {
.body-lg();
}
h1,
h2,
h3,
h4,
h5,
p {
color: var(--white);
}
}
}