mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 02:59:13 +00:00
fix ltrs
This commit is contained in:
@@ -488,7 +488,7 @@ export default class SlCarousel extends ShoelaceElement {
|
||||
const currentPage = this.getCurrentPage();
|
||||
const prevEnabled = this.canScrollPrev();
|
||||
const nextEnabled = this.canScrollNext();
|
||||
const isLtr = this.localize.dir() === 'ltr';
|
||||
const isLtr = this.matches(':dir(ltr)');
|
||||
|
||||
return html`
|
||||
<div part="base" class="carousel">
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class SlImageComparer extends ShoelaceElement {
|
||||
}
|
||||
|
||||
private handleKeyDown(event: KeyboardEvent) {
|
||||
const isLtr = this.localize.dir() === 'ltr';
|
||||
const isLtr = this.matches(':dir(ltr)');
|
||||
const isRtl = this.matches(':dir(rtl)');
|
||||
|
||||
if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {
|
||||
|
||||
@@ -108,7 +108,7 @@ export default class SlRating extends ShoelaceElement {
|
||||
}
|
||||
|
||||
private handleKeyDown(event: KeyboardEvent) {
|
||||
const isLtr = this.localize.dir() === 'ltr';
|
||||
const isLtr = this.matches(':dir(ltr)');
|
||||
const isRtl = this.matches(':dir(rtl)');
|
||||
const oldValue = this.value;
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ export default class SlTree extends ShoelaceElement {
|
||||
}
|
||||
|
||||
const items = this.getFocusableItems();
|
||||
const isLtr = this.localize.dir() === 'ltr';
|
||||
const isLtr = this.matches(':dir(ltr)');
|
||||
const isRtl = this.matches(':dir(rtl)');
|
||||
|
||||
if (items.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user