macro-carousel icon indicating copy to clipboard operation
macro-carousel copied to clipboard

[layout] Allow centered slides

Open ciampo opened this issue 7 years ago • 4 comments

The selected slide would be in the middle of the view. This would require a few changes to how the carousel works.

ciampo avatar Dec 19 '17 11:12 ciampo

Can the new CSS scroll snap control may helps?

equinusocio avatar Sep 22 '18 15:09 equinusocio

It could, but it may also require deep refactoring. Also, the new version of the spec is not supported by many browsers, so it would require a fallback solution

ciampo avatar Sep 24 '18 14:09 ciampo

Btw this can be done easily by composing in the light dom. Users can define slider with a single centered content. Something like this:

<style>
div {
  display: flex; /* or grid */
  justify-content: center;
}
</style>
<macro-carousel>
  <div> [Centered Content] </div>
  <div> [Centered Content] [Centered Content] </div>
  <div> [Centered Content] </div>
</macro-carousel>

equinusocio avatar Apr 08 '19 10:04 equinusocio

By "centered slides" I meant something like this (hope it helps explaining the idea):

Screenshot 2019-04-22 at 1 42 10 PM

ciampo avatar Apr 22 '19 05:04 ciampo