Skip to content

Commit

Permalink
Merge pull request #786 from zaaakher/docs/rtl-gaps
Browse files Browse the repository at this point in the history
[Feat]: Add RTL case for slide gaps via CSS in docs
  • Loading branch information
davidjerleke committed Apr 3, 2024
2 parents ee8fb62 + 89b9183 commit e453e61
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 e453e61

Please sign in to comment.