Skip to content

Commit

Permalink
fix: new slider indents for header and media blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
qradle-yndx committed Aug 28, 2024
1 parent e14fc65 commit 2a775b3
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/blocks/SliderNew/Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $block: '.#{$ns}SliderNewBlock';
}

$dotsCn: '.swiper-container-horizontal .swiper-pagination-bullets';
$wrapperCn: '.swiper-wrapper';

$dotSize: 8px;

Expand Down Expand Up @@ -235,20 +236,24 @@ $dotSize: 8px;
margin-left: 0;
}

#{$wrapperCn} {
padding-left: 0;
}

#{$root}__slide {
// to remove the indentation between slides
padding-right: 0;
padding-left: 0;

&:last-child {
padding-right: 0;
}
}
}
}
}

@media (max-width: map-get($gridBreakpoints, 'md')) {
margin-left: -$indentXXXS;
padding-left: 0;
width: calc(100% + #{$indentXXXS});

&__footer {
display: block;

Expand All @@ -262,15 +267,17 @@ $dotSize: 8px;

@media (max-width: map-get($gridBreakpoints, 'sm')) {
$horizontalPadding: $gridContainerMargin + $gridGutterMobile;

&:not(&_one-slide) {
margin-left: #{-$horizontalPadding};
padding-left: $horizontalPadding;
width: calc(100% + #{$horizontalPadding * 2});
overflow-x: auto;

#{$root}__slider {
padding: $indentSM $horizontalPadding $indentL;
margin: 0 0 0 #{-$horizontalPadding};
margin-left: #{-$horizontalPadding};
margin-right: 0;
}

& #{$wrapperCn} {
padding-left: $horizontalPadding - $gridGutter;
}

#{$root}__slide {
Expand Down

0 comments on commit 2a775b3

Please sign in to comment.