overleaf/services/web/frontend/stylesheets/app/plans/plans-new-design.less
Davinder Singh 8018bc7249 Website redesign - Plans page FQA's tabs Section (new-design) (#18696)
* running git reset head

* renaming the local-mixins file to _plans_faq

* removed js to rotate the icon

* format:fix

* adding aria-hidden for curly braces

* removing extra tab space

* removing .card.card-body extra class

* introducing accordions-container so that we can use the last-child property to remove the border of the last questions

* creating new website-redesign-ol-tabs class and adding new styles in this class

* adding content for managingYourSubscription and overleafIndividualPlans sections

* adding content in overleaf group plans section

* removing extra section

* running make cleanup_unused_locales

* cleaning after rebase

* deleting extra variable projectLimits

* fixing spaces around curly brackets and some additional changes after rebase

GitOrigin-RevId: 3c2267080825d853e680a0a207cb640226262be2
2024-06-14 08:04:37 +00:00

454 lines
10 KiB
Text

@z-index-plans-new-tabs: 1;
@z-index-plans-new-tabs-content: 0;
.plans-new-design {
.plans-new-content {
display: flex;
flex-direction: column;
align-items: center;
@media (min-width: @screen-sm-min) {
border-left: 1px solid var(--neutral-20);
border-right: 1px solid var(--neutral-20);
border-bottom: 1px solid var(--neutral-20);
border-radius: 8px;
}
// this is the border between the tabs and the content, specifically on the left and right side
// this is necessary to enable top border radius on the plans-new-content
&::before {
content: '';
display: block;
z-index: @z-index-plans-new-tabs-content;
position: absolute;
top: -1px; // make border overlap with the border on .plans-new-tabs
width: 100%;
height: 20px; // arbitrary height since it's transparent, make sure that it's bigger than border radius
background: transparent;
border-top: 1px solid var(--neutral-20);
@media (min-width: @screen-sm-min) {
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
}
}
.plans-new-tabs-container {
z-index: @z-index-plans-new-tabs;
// explicit padding to tell that the bottom left and bottom right
// does not have bottom border defined in .plans-new-tabs
// technically unnecessary because padding is already defined in bootstrap column
padding: 0 16px;
}
.plans-new-tabs {
display: flex;
justify-content: center;
gap: 8px;
border-bottom: 1px solid var(--neutral-20);
.plans-new-tab {
cursor: pointer;
font-size: 16px;
font-weight: 600;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
.plans-new-tab-link {
border: unset;
display: flex;
align-items: center;
gap: 12px;
color: var(--neutral-70);
margin: 0;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border: 1px solid var(--neutral-20);
&:focus {
background-color: unset;
border: 1px solid var(--emerald-green);
}
&:hover {
background-color: var(--neutral-20);
}
// tab navigation focus style
&:focus-visible {
// https://stackoverflow.com/a/38571103
outline: auto 2px Highlight; // firefox
outline: auto 5px -webkit-focus-ring-color;
background-color: white;
}
}
&.active {
.plans-new-tab-link {
border: 1px solid white;
position: relative;
// remove the border on tab focus
&:focus-visible {
&::before {
content: unset;
}
}
&::before {
content: '';
position: absolute;
background: border-box
linear-gradient(
to bottom,
@emerald-green 0%,
@neutral-20 85%,
@neutral-20 100%
);
-webkit-mask:
linear-gradient(white 0 0) padding-box,
linear-gradient(white 0 0);
mask:
linear-gradient(white 0 0) padding-box,
linear-gradient(white 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
border: 1px solid transparent;
border-bottom: 1px solid white;
// make the border overlap with the .plans-new-tab-link border
top: 0;
bottom: -2px;
left: -1px;
right: -1px;
}
&:hover {
background-color: unset;
}
}
.plans-new-discount-badge {
background-color: #eaf6ef;
color: var(--emerald-green);
}
}
}
}
@switcher-container-width: 270px;
@switcher-container-height: 44px;
@switcher-container-border-radius: @switcher-container-height / 2;
@switcher-container-padding: 6px;
@switcher-padding-vertical: 2px;
@switcher-height: @switcher-container-height - 2 * @switcher-container-padding;
@switcher-border-radius: @switcher-height / 2;
.plans-new-period-switcher-container {
display: flex;
justify-content: center;
background-color: var(--neutral-10);
width: @switcher-container-width;
height: @switcher-container-height;
border-radius: @switcher-container-border-radius;
padding: @switcher-container-padding;
margin-top: @spacing-09;
margin-bottom: 40px;
.plans-new-period-switcher {
font-size: var(--font-size-05);
font-weight: 600;
line-height: var(--line-height-04);
text-align: center;
padding: 2px 8px;
height: @switcher-height;
border-radius: @switcher-border-radius;
display: flex;
align-items: center;
border: unset;
background-color: unset;
&:hover {
background-color: var(--neutral-20);
}
&.active {
background-color: var(--emerald-green);
color: white;
box-shadow: 0px 2px 4px 0px rgba(30, 37, 48, 0.16);
.plans-new-discount-badge {
background-color: #eaf6ef;
color: var(--emerald-green);
}
}
.plans-new-discount-badge {
margin-left: 6px;
}
}
}
.plans-new-discount-badge {
font-size: var(--font-size-01);
font-family: 'DM Mono', monospace;
padding: 2px 8px;
height: 20px;
border-radius: 10px;
background-color: var(--neutral-70);
color: white;
display: flex;
align-items: center;
}
.plans-new-tab-content {
width: 100%;
border: none;
padding-top: 0;
}
.plans-new-mobile {
display: none;
@media (max-width: @screen-xs-max) {
display: flex;
}
}
.plans-new-desktop {
display: flex;
@media (max-width: @screen-xs-max) {
display: none;
}
}
.plans-new-table {
width: 100%;
// overrides
th {
font-weight: normal;
}
// dynamic height on table head
thead {
tr {
height: 100%;
th {
height: 100%;
}
}
}
}
.plans-new-table-4-column {
th,
td {
width: 25%;
}
}
.plans-new-table-group {
.plans-new-table-header-price-container {
min-height: 85px;
}
// css specificity issue
thead tr th .plans-new-table-header-title {
@media (max-width: @screen-md-max) {
font-size: var(--font-size-03);
}
}
}
.plans-new-table-header {
padding: @spacing-06 @spacing-08;
@media (max-width: @screen-md-max) {
padding: @spacing-05;
}
}
.plans-new-table-header-content {
display: flex;
flex-direction: column;
height: 100%;
position: relative;
.plans-new-table-header-title {
font-size: var(--font-size-05);
font-weight: 600;
line-height: var(--line-height-04);
margin-bottom: @spacing-04;
color: var(--neutral-90);
text-align: center;
}
.plans-new-table-header-nondiscounted-price {
position: absolute;
top: 50px;
left: 25px;
font-size: var(--font-size-04);
line-height: var(--line-height-05);
color: var(--neutral-40);
font-weight: 600;
@media (max-width: @screen-md-max) {
left: 0;
}
@media (max-width: @screen-sm-max) {
left: -22px;
}
}
.plans-new-table-header-price-container {
display: flex;
flex-direction: column;
align-items: center;
}
.plans-new-table-header-price {
font-size: var(--font-size-08);
font-weight: 600;
line-height: var(--line-height-07);
color: var(--neutral-90);
}
.plans-new-table-header-icon {
margin-top: @spacing-02;
font-size: 56px;
align-self: center;
color: var(--neutral-90);
}
.plans-new-table-header-price-unit {
font-size: var(--font-size-02);
line-height: var(--line-height-02);
}
.plans-new-table-header-price-unit-total {
font-size: var(--font-size-01);
line-height: var(--line-height-01);
}
.plans-new-table-header-desc {
margin-top: @spacing-05;
margin-bottom: @spacing-08;
font-size: var(--font-size-02);
line-height: var(--line-height-02);
}
.plans-new-table-button {
margin-top: auto;
}
}
.faq-heading-container {
text-align: center;
@media (max-width: @screen-xs-max) {
text-align: unset;
}
.faq-heading {
font-size: 2rem;
padding-right: 1rem;
}
}
.plans-faq-header-section {
text-align: center;
max-width: 900px;
margin-top: 64px;
margin-left: auto;
margin-right: auto;
.website-redesign-ol-tabs {
overflow-x: auto;
@media (max-width: @screen-xs-max) {
padding: unset;
}
.nav-tabs {
min-width: max-content; // This is for horizontal scrolling
@media (max-width: @screen-xs-max) {
display: flex;
}
}
}
}
.plans-faq-questions-section {
max-width: 850px;
margin: auto;
.faq-questions-container {
@media (max-width: @screen-xs-max) {
padding: unset;
}
}
.tab-content {
border: 0px;
}
}
.accordions-container :last-child {
border: 0px !important;
}
.accordions-container {
.custom-accordion-item {
width: 100%;
padding-top: 24px;
padding-bottom: 32px;
border-bottom: 1px solid @neutral-20;
.custom-accordion-header {
text-align: left;
width: 100%;
font-size: 1.125rem;
font-weight: 600;
line-height: 24px;
color: @neutral-90;
background-color: unset;
border: unset;
display: flex;
justify-content: space-between;
padding: unset;
.custom-accordion-icon {
display: flex;
align-items: center;
transition: transform 0.35s ease;
}
&:not(.collapsed) {
.custom-accordion-icon {
transform: rotate(180deg);
transition: transform 0.35s ease;
}
}
}
.custom-accordion-body {
background-color: unset;
text-align: left;
padding: unset;
padding-right: 2rem;
margin-top: 8px;
font-size: 1rem;
line-height: 24px;
}
}
}
}