Skip to content

Commit

Permalink
fix: use relative features width column
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbertrand committed Dec 6, 2021
1 parent 1d35361 commit 65eaea2
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions assets/scss/components/slices/features.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
.features {
&__title h2 {
color: $grey-80;
font-weight: normal;
letter-spacing: 0.15px;
line-height: 49px;
text-align: center;
margin-top: 0;
padding: 100px 0 0;
}
&__title h2 {
color: $grey-80;
font-weight: normal;
letter-spacing: 0.15px;
line-height: 49px;
text-align: center;
margin-top: 0;
padding: 100px 0 0;
}

&__wrapper {
padding: 60px 10%;
display: flex;
flex-direction: column;
// align-items: center;
margin: 0 auto;
word-break: break-word;
}
&__wrapper {
padding: 60px 10%;
display: flex;
flex-direction: column;
margin: 0 auto;
word-break: break-word;
}
}

.features-wrapper {
Expand All @@ -33,7 +32,7 @@
display: flex;
justify-content: center;
}

&__content {
margin-left: 20px;
}
Expand All @@ -58,18 +57,16 @@
}
}
}

}

@include device-is('large-screen') {
$column-width: 294px;
$column-gap: 74px;
$gap: 74px;

.features {
&__wrapper {
display: flex;
flex-direction: row;
gap: $column-gap;
gap: $gap;
flex-wrap: wrap;
justify-content: center;
align-items: stretch;
Expand All @@ -78,17 +75,21 @@
/* Si 5 items */
/* Afficher 3 items sur une ligne puis 2 items sur une autre */
padding: 60px 0;
max-width: calc(3 * ($column-gap + $column-width));
max-width: 75%;
margin: 0 auto;

.features-wrapper__item {
flex-basis: calc(33.33% - $gap * 2 / 3);
}
}
}
}

.features-wrapper {
&__item {
width: $column-width;
text-align: center;
display: block;
flex-basis: calc(25% - ($gap * 3 / 4));
}

&-item__image {
Expand Down

0 comments on commit 65eaea2

Please sign in to comment.