Closed aghassemi closed 1 year ago
so how is everything going? can <amp-carousel>
support us to hide the scrollbar?
Not yet, though it's still something on my list to do—@aghassemi or @camelburrito , is this an approachable feature for non-core contributors, or something that a developer would have to be pretty comfortable with building components to do?
@grahamle would you be interested in sending a PR? The version of amp-carousel
with type=slides
already does this with CSS.
add the code below into your own css file will do the trick amp-carousel .i-amphtml-scrollable-carousel-container::-webkit-scrollbar {display:none}
@ericlindley-g Just let you know we've fixed the horizontal scroll bar issue, by our engineer @hackshen
@hackshen - -webkit-scrollbar
only works on webkit browsers + i have faced issues with setting scrollbar height to 0 on type="slides" . An ideal fix would be what @aghassemi described above. We would be super happy if you would be willing to send in a pull request and contribute to AMP.
Here is a link to help you get started https://github.com/ampproject/amphtml/blob/master/CONTRIBUTING.md#tips-for-new-open-source-contributors
Let me know if you are interested and if you need help !
add the code below into your own css file will do the trick amp-carousel .i-amphtml-scrollable-carousel-container::-webkit-scrollbar {display:none}
In tried this but it turned amp to be invalid
I still cant removed the scroll bar any better way of doing it
Here's a patch which works @Amanrazdan
amp-carousel > div:first-child {
scrollbar-width: none; /* For Firefox */
}
amp-carousel > div:first-child::-webkit-scrollbar {
display:none; /* For Chromium */
}
@hackshen
The .i-amphtml-...
classes should never be styled directly. But there's always the work-around to use a different selector.
any news on that? 😅
Any update on that matter? I tried hiding the horizontal scrollbar with the css styling as stated but it is still visible (it actually looks like an iframe in the middle of a -beautiful- page...)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Closing for now, but feel free to re-open and we can reprioritize
There are use-cases where showing the scrollbars for the
<amp-carousel>
is not desirable as user scrolls. We should add a simplenoscrollbars
attribute. We can use the same technique used in slides to hide the scrollbars