Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cards-update: update card styles to match new designs #212

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 62 additions & 21 deletions blocks/cards/cards.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.cards.block {
padding-bottom: 32px;
}

.cards.wide.block {
margin: 0 auto;
max-width: var(--wide-page-width);
border-bottom: 1px solid var(--secondary-accent);
}

.cards.block,
.cards.block .cards-list {
display: flex;
Expand All @@ -11,10 +21,12 @@
}

.cards.block .title h4 {
text-transform: uppercase;
text-align: center;
letter-spacing: var(--letter-spacing-l);
color: var(--primary-color);
font-size: var(--heading-font-size-s);
font-weight: var(--font-weight-bold);
line-height: var(--line-height-m);
text-align: center;
text-transform: capitalize;
}

.cards.block .cards-list .cards-item {
Expand Down Expand Up @@ -61,15 +73,17 @@
}

.cards.block .cards-list .cards-item .card-image p {
position: absolute;
left: 0;
background-color: var(--white);
bottom: 0;
text-transform: uppercase;
padding: 1em .5em 0 0;
font-size: var(--heading-font-size-xxs);
font-weight: var(--font-weight-bold);
left: 0;
letter-spacing: var(--letter-spacing-m);
margin: 0;
min-width: calc((2 / 3) * 100%);
letter-spacing: var(--letter-spacing-l);
background-color: var(--white);
padding: 16px 16px 0 0;
position: absolute;
text-transform: uppercase;
}

.cards.block .cards-list .cards-item .card-body h3 {
Expand All @@ -79,8 +93,13 @@
}

.cards.block .cards-list .cards-item .card-body p {
margin: 8px 0 24px;
font-size: var(--body-font-size-xs);
letter-spacing: var(--letter-spacing-xs);
margin: 8px 0 24px;
}

.tertiary-background .cards.block .cards-list .cards-item .card-image p {
background-color: var(--tertiary-color);
}

.cards.block .cards-list .cards-item .card-body .button-container {
Expand All @@ -90,9 +109,9 @@
}

.cards.block .cards-list .cards-item .card-body .button-container a {
border: 1px solid var(--primary-color);
color: var(--primary-color);
padding: 10px 24px;
border: 1px solid var(--black);
color: var(--black);
}

/* Icons variation */
Expand Down Expand Up @@ -134,15 +153,6 @@
margin-bottom: 0;
}

.cards.block.shade-icon .cards-list .cards-item .card-body p {
text-align: center;
margin-bottom: 10px;
}

.section.grey-background .cards.block .cards-list .cards-item .card-image p {
background-color: var(--light-grey);
}

.cards.block.shade-icon .cards-list .cards-item {
background-color: var(--light-grey);
padding: 0;
Expand All @@ -152,6 +162,20 @@
justify-content: center;
}

.cards.block.tertiary-background.border-top .cards-list .cards-item {
background-color: var(--tertiary-color);
border-top: 1px solid var(--secondary-light);
}

.cards.block.shade-icon .cards-list .cards-item .card-body p {
text-align: center;
margin-bottom: 10px;
}

.section.grey-background .cards.block .cards-list .cards-item .card-image p {
background-color: var(--light-grey);
}

.cards.block.shade-icon .cards-list .cards-item .card-body h4 {
padding: 8px 30px;
text-align: center;
Expand Down Expand Up @@ -207,6 +231,10 @@
}

@media (min-width: 900px) {
.cards.block .title h4 {
font-size: var(--heading-font-size-m);
}

.cards.block .cards-list {
flex-direction: row;
align-items: stretch;
Expand Down Expand Up @@ -234,16 +262,29 @@
max-height: 500px;
}

.cards.block .cards-list .cards-item .card-image p {
font-size: var(--heading-font-size-xs);
}

.cards.block.cards-2-cols .cards-list .cards-item .card-image picture {
padding-bottom: 45%;
}

.cards.block .cards-list .cards-item .card-body h3 {
font-size: var(--heading-font-size-xl);
font-weight: var(--font-weight-semibold);
}

.cards.block.icons .cards-list {
flex-flow: row wrap;
align-items: stretch;
column-gap: 20px;
}

.cards.block .cards-list .cards-item .card-body p {
font-size: var(--body-font-size-s);
}

.cards.block.shade-icon .cards-list .cards-item .card-body p:not(:first-of-type) {
padding: 0 25px 54px;
}
Expand Down
40 changes: 30 additions & 10 deletions blocks/property-listing/cards/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
flex-direction: column;
scroll-snap-align: start;
flex-shrink: 0;
width: 250px;
width: 80%;
max-width: 90%;
background-color: var(--white);
}

.property-list-cards .listing-tile a {
aspect-ratio: 16/9;
aspect-ratio: 1.3/1;
}

.property-list-cards .listing-tile .property-no-available-image {
Expand Down Expand Up @@ -105,7 +105,7 @@
.property-list-cards .property-labels .property-label {
display: initial;
height: 24px;
font-size: var(--body-font-size-xs);
font-size: var(--body-font-size-xxs);
padding: 0 7px;
line-height: 24px;
font-family: var(--font-family-primary);
Expand Down Expand Up @@ -212,21 +212,21 @@
}

.property-list-cards .property-details .property-info-wrapper .address {
color: var(--body-color);
font-family: var(--font-family-primary);
font-size: var(--body-font-size-xs);
font-weight: var(--font-weight-normal);
font-size: var(--body-font-size-s);
color: var(--body-color);
letter-spacing: var(--letter-spacing-xxs);
line-height: var(--line-height-s);
margin: 2px 0;
padding-top: 4px;
}

.property-list-cards .property-details .property-info-wrapper .specs {
color: var(--body-color);
font-family: var(--font-family-primary);
font-size: var(--body-font-size-xxs);
font-weight: var(--font-weight-light);
color: var(--body-color);
font-size: var(--body-font-size-xs);
letter-spacing: var(--letter-spacing-xxs);
line-height: normal;
padding-top: 3px;
Expand All @@ -240,7 +240,7 @@
}

.property-list-cards .property-details .property-buttons .buttons-row-flex {
justify-content: space-around;
justify-content: flex-end;
flex-grow: 1;
display: flex;
flex-wrap: wrap;
Expand All @@ -251,6 +251,12 @@
height: 24px;
position: relative;
background-color: transparent;
margin-left: 10px;
}

.property-list-cards .property-details .property-buttons .button-property img {
height: 24px;
width: 24px;
}

.property-list-cards .property-details .property-buttons .button-property span {
Expand Down Expand Up @@ -295,9 +301,9 @@
}

.property-list-cards .listing-tile .extra-info div {
font-size: var(--body-font-size-xs);
font-family: var(--font-family-primary);
color: var(--dark-grey);
font-family: var(--font-family-primary);
font-size: var(--body-font-size-xxs);
letter-spacing: 0;
line-height: var(--line-height-xs);
}
Expand All @@ -311,6 +317,20 @@
display: block;
}

@media (min-width: 900px) {
.property-list-cards .property-details .property-info-wrapper .address {
font-size: var(--body-font-size-s);
}

.property-list-cards .property-details .property-info-wrapper .specs {
font-size: var(--body-font-size-xxs);
}

.property-list-cards .listing-tile .extra-info div {
font-size: var(--body-font-size-xxs);
}
}

@media (min-width: 1200px) {
.property-list-cards {
display: grid;
Expand Down
7 changes: 4 additions & 3 deletions blocks/property-listing/property-listing.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
}

.property-listing.block .header > div > span {
font-weight: var(--font-weight-bold);
text-transform: uppercase;
border-bottom: 3px solid var(--primary-color);
color: var(--primary-color);
font-size: var(--heading-font-size-l);
font-weight: var(--font-weight-semibold);
letter-spacing: initial;
line-height: var(--line-height-m);
text-transform: capitalize;
}

.property-listing.block .header > div > p {
Expand Down
1 change: 1 addition & 0 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
--heading-font-size-m: 18px;
--heading-font-size-s: 16px;
--heading-font-size-xs: 12px;
--heading-font-size-xxs: 10px;

/* Body */
--body-font-size-xxxl: 40px;
Expand Down
Loading