Skip to content

Commit

Permalink
Add carousel-start modifier (#2889)
Browse files Browse the repository at this point in the history
  • Loading branch information
2hu12 committed Mar 9, 2024
1 parent f270829 commit 61e7d2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/unstyled/carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit 61e7d2b

Please sign in to comment.