]> BookStack Code Mirror - bookstack/commitdiff
RTL: Fixed lacking task list RTL support
authorDan Brown <redacted>
Tue, 27 Aug 2024 13:13:33 +0000 (14:13 +0100)
committerDan Brown <redacted>
Tue, 27 Aug 2024 13:13:33 +0000 (14:13 +0100)
Added with fallback to old LTR styles.
For #5134

resources/sass/_text.scss
resources/sass/_tinymce.scss

index 9f367984ad57eeb805297ea688efcb7072ce9c48..9acfe2ceed37348f13939b65995f49553e8c1219 100644 (file)
@@ -309,15 +309,26 @@ li > ol, li > ul {
   padding-right: $-m * 1.2;
 }
 
+/**
+ * Checkbox lists
+ * Some styles duplicated for supporting logical units (eg. inline-end) while
+ * providing fallbacks to non-logical rules, so RTL is natively supported where possible.
+ */
 li.checkbox-item, li.task-list-item {
   display: list-item;
   list-style: none;
   margin-left: -($-m * 1.2);
+  margin-inline-start: -($-m * 1.2);
+  margin-inline-end: 0;
   input[type="checkbox"] {
     margin-right: $-xs;
+    margin-inline-end: $-xs;
+    margin-inline-start: 0;
   }
   li.checkbox-item, li.task-list-item {
     margin-left: $-xs;
+    margin-inline-start: $-xs;
+    margin-inline-end: 0;
   }
 }
 
index 95294cdf2c0885636b12ece48f10d2ad865616fb..129e478212b3b9b00849e109d3fca329b2258818 100644 (file)
@@ -173,7 +173,7 @@ body.page-content.mce-content-body  {
  * Fake task list checkboxes
  */
 .page-content.mce-content-body .task-list-item {
-  margin-left: 0;
+  margin-inline-start: 0;
   position: relative;
 }
 .page-content.mce-content-body .task-list-item > input[type="checkbox"] {
@@ -186,11 +186,11 @@ body.page-content.mce-content-body  {
   width: 12px;
   height: 12px;
   border-radius: 2px;
-  margin-right: 8px;
+  margin-inline-end: 8px;
   vertical-align: text-top;
   cursor: pointer;
   position: absolute;
-  left: -24px;
+  inset-inline-start: -24px;
   top: 4px;
 }