Skip to content

Commit 0d40fa0

Browse files
committed
refactor(Calendar, DatePicker, DateRangePicker, TimePicker): improve RTL support
1 parent 0ce518b commit 0d40fa0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

scss/_calendar.scss

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,38 +200,38 @@
200200
}
201201

202202
.calendars:not(.select-week) &.range:not(.range ~ *) .calendar-cell-inner::after {
203-
@include border-start-radius($border-radius);
203+
@include border-start-radius-flex($border-radius);
204204
}
205205

206206
.calendars:not(.select-week) &.range:not(:has(~ .range)) .calendar-cell-inner::after {
207-
@include border-end-radius($border-radius);
207+
@include border-end-radius-flex($border-radius);
208208
}
209209

210210
&.range-hover:first-of-type,
211211
&:not(.range-hover) + &.range-hover {
212212
.calendar-cell-inner::before {
213-
border-left: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
214-
@include border-start-radius($border-radius);
213+
border-inline-start: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
214+
@include border-start-radius-flex($border-radius);
215215
}
216216
}
217217

218218
&.range-hover:not(:has(~ .range-hover)) .calendar-cell-inner::before {
219-
border-right: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
220-
@include border-end-radius($border-radius);
219+
border-inline-end: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
220+
@include border-end-radius-flex($border-radius);
221221
}
222222

223223
// stylelint-disable-next-line at-rule-no-vendor-prefix
224224
@-moz-document url-prefix() {
225225
.calendars:not(.select-week) &:nth-last-child(1 of .range),
226226
.calendars:not(.select-week) &:nth-last-child(1 of .available) {
227227
.calendar-cell-inner::after {
228-
@include border-end-radius($border-radius);
228+
@include border-end-radius-flex($border-radius);
229229
}
230230
}
231231

232232
&:nth-last-child(1 of .range-hover) .calendar-cell-inner::before {
233-
border-right: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
234-
@include border-end-radius($border-radius);
233+
border-inline-end: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
234+
@include border-end-radius-flex($border-radius);
235235
}
236236
}
237237

@@ -264,27 +264,27 @@
264264
}
265265

266266
.calendar-cell:first-of-type .calendar-cell-inner {
267-
@include border-start-radius($border-radius);
267+
@include border-start-radius-flex($border-radius);
268268
&::before,
269269
&::after {
270-
@include border-start-radius($border-radius);
270+
@include border-start-radius-flex($border-radius);
271271
}
272272
}
273273

274274
.calendar-cell:last-of-type .calendar-cell-inner {
275-
@include border-end-radius($border-radius);
275+
@include border-end-radius-flex($border-radius);
276276
&::before,
277277
&::after {
278-
@include border-end-radius($border-radius);
278+
@include border-end-radius-flex($border-radius);
279279
}
280280
}
281281

282282
&.range-hover .calendar-cell:first-of-type .calendar-cell-inner::before {
283-
border-left: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
283+
border-inline-start: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
284284
}
285285

286286
&.range-hover .calendar-cell:last-of-type .calendar-cell-inner::before {
287-
border-right: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
287+
border-inline-end: 1px dashed var(--#{$prefix}calendar-cell-selected-bg);
288288
}
289289

290290
&:focus-visible {

0 commit comments

Comments
 (0)