Skip to content

Commit

Permalink
[Feat]: Add RTL case for slide gaps via CSS
Browse files Browse the repository at this point in the history
Co-authored-by: David <[email protected]>
  • Loading branch information
zaaakher and davidjerleke committed Apr 3, 2024
1 parent ee8fb62 commit 89b9183
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ It's also valid to add gaps in both directions:
}
```

If you want to accomodate for RTL languages, you can use [`margin-inline-end`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-end) and [`margin-inline-start`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-start) instead:

```css
.embla__slide {
margin-inline-end: 20px; /* Space after the slide */
margin-inline-start: 10px; /* Space before the slide */
}
```

If you're using CSS Grid you can declare your gaps like so:

```css
Expand Down

0 comments on commit 89b9183

Please sign in to comment.