Add carousel-start modifier (#2889)

This commit is contained in:
2hu 2024-03-09 15:54:24 +08:00 committed by GitHub
parent f270829f40
commit 61e7d2b354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,9 @@
@apply box-content flex flex-none;
scroll-snap-align: start;
}
&-start .carousel-item {
scroll-snap-align: start;
}
&-center .carousel-item {
scroll-snap-align: center;
}

View File

@ -20,6 +20,7 @@ layout: components
data="{[
{ type:'component', class: 'carousel', desc: 'Container element' },
{ type:'component', class: 'carousel-item', desc: 'Carousel item' },
{ type:'modifier', class: 'carousel-start', desc: 'Snap elements to start(default)' },
{ type:'modifier', class: 'carousel-center', desc: 'Snap elements to center' },
{ type:'modifier', class: 'carousel-end', desc: 'Snap elements to end' },
{ type:'modifier', class: 'carousel-vertical', desc: 'Vertical carousel' },