Skip to content

Commit 8cef998

Browse files
committed
RTL: Fixed lacking task list RTL support
Added with fallback to old LTR styles. For #5134
1 parent 90d1223 commit 8cef998

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

resources/sass/_text.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,26 @@ li > ol, li > ul {
309309
padding-right: $-m * 1.2;
310310
}
311311

312+
/**
313+
* Checkbox lists
314+
* Some styles duplicated for supporting logical units (eg. inline-end) while
315+
* providing fallbacks to non-logical rules, so RTL is natively supported where possible.
316+
*/
312317
li.checkbox-item, li.task-list-item {
313318
display: list-item;
314319
list-style: none;
315320
margin-left: -($-m * 1.2);
321+
margin-inline-start: -($-m * 1.2);
322+
margin-inline-end: 0;
316323
input[type="checkbox"] {
317324
margin-right: $-xs;
325+
margin-inline-end: $-xs;
326+
margin-inline-start: 0;
318327
}
319328
li.checkbox-item, li.task-list-item {
320329
margin-left: $-xs;
330+
margin-inline-start: $-xs;
331+
margin-inline-end: 0;
321332
}
322333
}
323334

resources/sass/_tinymce.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ body.page-content.mce-content-body {
173173
* Fake task list checkboxes
174174
*/
175175
.page-content.mce-content-body .task-list-item {
176-
margin-left: 0;
176+
margin-inline-start: 0;
177177
position: relative;
178178
}
179179
.page-content.mce-content-body .task-list-item > input[type="checkbox"] {
@@ -186,11 +186,11 @@ body.page-content.mce-content-body {
186186
width: 12px;
187187
height: 12px;
188188
border-radius: 2px;
189-
margin-right: 8px;
189+
margin-inline-end: 8px;
190190
vertical-align: text-top;
191191
cursor: pointer;
192192
position: absolute;
193-
left: -24px;
193+
inset-inline-start: -24px;
194194
top: 4px;
195195
}
196196

0 commit comments

Comments
 (0)