ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

<amp-carousel type="carousel">: Support hiding scrollbars #6222

Closed aghassemi closed 1 year ago

aghassemi commented 7 years ago

There are use-cases where showing the scrollbars for the <amp-carousel> is not desirable as user scrolls. We should add a simple noscrollbars attribute. We can use the same technique used in slides to hide the scrollbars

grahamle commented 6 years ago

so how is everything going? can <amp-carousel> support us to hide the scrollbar?

ericlindley-g commented 6 years ago

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?

aghassemi commented 6 years ago

@grahamle would you be interested in sending a PR? The version of amp-carousel with type=slides already does this with CSS.

hackshen commented 6 years ago

add the code below into your own css file will do the trick amp-carousel .i-amphtml-scrollable-carousel-container::-webkit-scrollbar {display:none}

grahamle commented 6 years ago

@ericlindley-g Just let you know we've fixed the horizontal scroll bar issue, by our engineer @hackshen

camelburrito commented 6 years ago

@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 !

amanintech commented 5 years ago

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

amanintech commented 5 years ago

I still cant removed the scroll bar any better way of doing it

mehigh commented 5 years ago

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.

marinastavares commented 4 years ago

any news on that? 😅

natoinet commented 3 years ago

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...)

stale[bot] commented 1 year ago

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.

erwinmombay commented 1 year ago

Closing for now, but feel free to re-open and we can reprioritize