Skip to content

Commit cc629f4

Browse files
authored
Merge pull request #467 from ismail9k/172-itemstoshow-auto
Support items to show auto
2 parents 8d01e32 + 4ddb835 commit cc629f4

38 files changed

+696
-730
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ const carouselConfig = {
7070

7171
Visit our [documentation website](https://vue3-carousel.ismail9k.com/) for detailed usage and examples:
7272

73-
- [Getting Started](https://vue3-carousel.ismail9k.com/guide)
74-
- [Carousel Component](https://vue3-carousel.ismail9k.com/components/carousel)
73+
- [Getting Started](https://vue3-carousel.ismail9k.com/getting-started)
74+
- [Carousel Config](https://vue3-carousel.ismail9k.com/config)
7575
- [Slide Component](https://vue3-carousel.ismail9k.com/components/slide)
7676
- [Navigation Component](https://vue3-carousel.ismail9k.com/components/navigation)
7777
- [Pagination Component](https://vue3-carousel.ismail9k.com/components/pagination)

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default tseslint.config(
2121
},
2222
},
2323
rules: {
24-
'no-console': 'error',
24+
'no-console': 'off',
2525
'@typescript-eslint/no-unused-vars': 'error',
2626
'@typescript-eslint/no-empty-function': 'off',
2727
'@typescript-eslint/no-non-null-assertion': 'off',

playground/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ select {
498498
}
499499
500500
.carousel__slide--active .carousel-item {
501-
border: 2px solid red;
501+
box-shadow: inset 0 0 0 2px red;
502502
}
503503
.config-panel-buttons-row {
504504
display: flex;

src/components/Carousel/Carousel.css

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1+
.carousel,
2+
.carousel * {
3+
box-sizing: border-box;
4+
}
5+
16
.carousel {
27
position: relative;
3-
text-align: center;
4-
box-sizing: border-box;
58
touch-action: pan-y;
69
overscroll-behavior: none;
10+
z-index: 1;
11+
height: var(--vc-carousel-height);
712
}
813

914
.carousel.is-dragging {
1015
touch-action: none;
1116
}
1217

13-
.carousel * {
14-
box-sizing: border-box;
15-
}
16-
1718
.carousel__track {
1819
display: flex;
20+
list-style: none;
1921
padding: 0 !important;
2022
margin: 0 !important;
23+
width: 100%;
24+
height: 100%;
2125
position: relative;
2226
transition: transform ease-out;
23-
height: var(--vc-trk-height, auto);
24-
transition-duration: var(--vc-trk-transition-duration);
27+
transition-duration: var(--vc-transition-duration);
28+
gap: var(--vc-slide-gap);
2529
}
2630

2731
.carousel__viewport {
2832
overflow: hidden;
33+
width: 100%;
34+
height: 100%;
2935
}
3036

3137
.carousel__sr-only {
@@ -53,13 +59,13 @@
5359

5460
.carousel.is-vertical {
5561
.carousel__slide--clone:first-child {
56-
margin-block-start: var(--vc-trk-cloned-offset);
62+
margin-block-start: var(--vc-cloned-offset);
5763
}
5864
}
5965

6066
.carousel:not(.is-vertical) {
6167
.carousel__slide--clone:first-child {
62-
margin-inline-start: var(--vc-trk-cloned-offset);
68+
margin-inline-start: var(--vc-cloned-offset);
6369
}
6470
}
6571

@@ -76,7 +82,7 @@
7682
width: 100% !important;
7783
height: 100% !important;
7884
transition: opacity ease-in-out;
79-
transition-duration: var(--vc-trk-transition-duration);
85+
transition-duration: var(--vc-transition-duration);
8086
grid-area: 1 / 1; /* Make all slides occupy the same grid cell */
8187
pointer-events: none; /* Prevent inactive slides from being clickable */
8288
}

0 commit comments

Comments
 (0)