Skip to content

Commit

Permalink
Fix: zigzag direction on mobile [TMZ-289](#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
mserino authored Jan 8, 2025
1 parent 8d8bb4d commit 196c8be
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions modules/content/assets/scss/hello-plus-zigzag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,36 +138,6 @@
}
}

&.has-direction {
&-start {
.ehp-zigzag__item-wrapper:nth-child(odd) {
.ehp-zigzag__item-container {
flex-direction: row;
}
}

.ehp-zigzag__item-wrapper:nth-child(even) {
.ehp-zigzag__item-container {
flex-direction: row-reverse;
}
}
}

&-end {
.ehp-zigzag__item-wrapper:nth-child(odd) {
.ehp-zigzag__item-container {
flex-direction: row-reverse;
}
}

.ehp-zigzag__item-wrapper:nth-child(even) {
.ehp-zigzag__item-container {
flex-direction: row;
}
}
}
}

&__text-container {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -278,12 +248,44 @@
}
}

@media screen and (min-width: $screen-desktop-min) {
&.has-direction {
&-start {
.ehp-zigzag__item-wrapper:nth-child(odd) {
.ehp-zigzag__item-container {
flex-direction: row;
}
}

.ehp-zigzag__item-wrapper:nth-child(even) {
.ehp-zigzag__item-container {
flex-direction: row-reverse;
}
}
}

&-end {
.ehp-zigzag__item-wrapper:nth-child(odd) {
.ehp-zigzag__item-container {
flex-direction: row-reverse;
}
}

.ehp-zigzag__item-wrapper:nth-child(even) {
.ehp-zigzag__item-container {
flex-direction: row;
}
}
}
}
}

@media screen and (max-width: $screen-tablet-max) {
.ehp-zigzag__item-container {
flex-direction: column;
}

&.has-direction-right {
&.has-direction-end {

.ehp-zigzag__graphic-element-container {
order: 2;
Expand Down

0 comments on commit 196c8be

Please sign in to comment.