akiran / akiran/react-slick

slick including unintended spacing in the end

Open
#1,872 0 comments 1 reaction 0 assignees View on GitHub
provide-codesandbox-to-replicate-issue
Dominant language
JavaScript
Stars
11.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

**Problem for the homepage**
![Screenshot_20200814_120915](https://user-images.githubusercontent.com/35342513/90224822-eaa81500-de2d-11ea-8bcc-f24c89660643.jpg)
I have styling for Navbar set with
```
.nav-links {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
opacity: 0;
flex-direction: column;
align-items: center;
justify-content: center;
row-gap: 2rem;
width: 100vw;
height: 100vh;
font-size: 2rem;
color: #fff;
background: #272727;
transition: opacity 0.5s 0.5s, clip-path 0.7s 0.5s;
clip-path: circle(200px at top right);
}
```
when navbar input is checked(hamburger),
```
.menu-btn:checked ~ .nav-links {
opacity: 1;
clip-path: circle(100% at center);
}
```
I have this working perfectly for all my pages except homepage which contains react-slick, and I found out its the one which is actually causing the problem because when I remove this ` {items}` it works perfectly just like other pages fully covering 100vh but somehow react-slick is causing the problem. I have tried removing all the styling done manually to check if it was working, even shortlisting the settings was also not able to do anything.
```
const settings = {
PauseOnHover: true,
dots: true,
infinite: true,
autoplay: true,
swipeToSlide: true,
speed: 1300,
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
};
```

**When working perfectly**
![Screen Shot 2020-08-14 at 12 19 01](https://user-images.githubusercontent.com/35342513/90224997-335fce00-de2e-11ea-990e-974011adc5ac.png)

To be noted this **happens only in mobile browsers**, I have tested this in Desktop browsers (chrome,mozilla) looking for responsiveness and it works perfectly but soon as I get this page running in all my android phones this bug just happens for no reason

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.