Skip to content

Commit

Permalink
Task component: add support for single column layout (#96722)
Browse files Browse the repository at this point in the history
* add support for single column layout for task component

* address feedback
  • Loading branch information
madhusudhand authored Nov 25, 2024
1 parent 986ff7c commit e602951
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";

$illustration-top: 32px;
$illustration-layer-offset: 16px;
$illustration-height: 139px;
Expand All @@ -7,9 +10,12 @@ $illustration-width: 214px;
&.task__domain-upsell {
.task__illustration {
display: flex;
width: calc(45% + 32px);
margin-bottom: -32px !important;
margin-right: -32px !important;

@include break-small {
width: calc(45% + 32px);
margin-bottom: -32px !important;
margin-right: -32px !important;
}
}
}
.task__domain-upsell-illustration {
Expand Down
21 changes: 14 additions & 7 deletions client/my-sites/customer-home/cards/tasks/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@

.task {
display: flex;
flex-direction: column;
position: relative;
margin-top: 0;
margin-bottom: 30px;
border-radius: 3px;

@include breakpoint-deprecated( ">660px" ) {
@include break-small {
flex-direction: row;
box-shadow: 0 0 0 1px var(--color-border-subtle);
margin-bottom: 16px;
}

.task__text,
.task__illustration {
box-sizing: border-box;
padding: 24px 24px 0;

@include breakpoint-deprecated( ">660px" ) {
@include break-small {
padding: 24px 16px;
}

@include breakpoint-deprecated( ">1040px" ) {
@include break-xlarge {
padding: 32px 24px;
}
}
Expand All @@ -35,11 +36,17 @@
}

.task__illustration {
width: 33.33%;
width: 100%;
align-self: center;
flex-shrink: 0;
margin-left: auto;
text-align: center;
margin-top: 32px;

@include break-small {
width: 33.33%;
margin-top: 0;
}
}

.task__timing {
Expand All @@ -66,7 +73,7 @@
line-height: 36px;
margin-bottom: 16px;

@include breakpoint-deprecated( ">800px" ) {
@include break-medium {
line-height: 40px;
}
}
Expand All @@ -77,7 +84,7 @@
line-height: 24px;
color: var(--color-text-subtle);

@include breakpoint-deprecated( ">800px" ) {
@include break-medium {
line-height: 28px;
margin-bottom: 32px;
}
Expand Down
4 changes: 0 additions & 4 deletions client/my-sites/customer-home/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ body.is-section-home.theme-default.color-scheme {
margin-right: 0;
}

.task__illustration {
text-align: right;
}

// 32px spacing for everything except the space before the CTA (48px)
.task__text {
gap: 16px;
Expand Down

0 comments on commit e602951

Please sign in to comment.