Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(client/rtl): handle margin-right
Elian Doran6b9301367477
diff --git a/apps/client/src/layouts/mobile_layout.tsx b/apps/client/src/layouts/mobile_layout.tsxindex 8d8dae6c26..91953b1a32 100644--- a/apps/client/src/layouts/mobile_layout.tsx+++ b/apps/client/src/layouts/mobile_layout.tsx@@ -81,7 +81,7 @@ const FANCYTREE_CSS = `span.fancytree-expander {width: 24px !important;- margin-right: 5px;+ margin-inline-end: 5px;}.fancytree-loading span.fancytree-expander {@@ -101,7 +101,7 @@ span.fancytree-expander {.tree-wrapper .scroll-to-active-note-button,.tree-wrapper .tree-settings-button {position: fixed;- margin-right: 16px;+ margin-inline-end: 16px;display: none;}diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.cssindex 574c0684bf..5e9b3daf38 100644--- a/apps/client/src/stylesheets/style.css+++ b/apps/client/src/stylesheets/style.css@@ -179,7 +179,7 @@ label.tn-checkbox + label.tn-checkbox {label.tn-radio input[type="radio"],label.tn-checkbox input[type="checkbox"] {- margin-right: .5em;+ margin-inline-end: .5em;}#left-pane input,@@ -1041,13 +1041,13 @@ svg.ck-icon .note-icon {}.ck-content .footnote-back-link {- margin-right: 0.1em;+ margin-inline-end: 0.1em;position: relative;top: -0.2em;}.ck-content .footnotes .footnote-back-link > sup {- margin-right: 0;+ margin-inline-end: 0;}.ck-content .footnote-item:before {@@ -1749,7 +1749,7 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {flex-shrink: 0;flex-direction: column;margin-inline-start: 10px;- margin-right: 5px;+ margin-inline-end: 5px;}#right-pane .card-header {@@ -1801,7 +1801,7 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {.note-split {margin-inline-start: auto;- margin-right: auto;+ margin-inline-end: auto;}.note-split.full-content-width {@@ -1820,7 +1820,7 @@ button.close:hover {.reference-link .bx {position: relative;top: 1px;- margin-right: 3px;+ margin-inline-end: 3px;}.options-section:first-of-type h4 {@@ -2319,12 +2319,12 @@ footer.webview-footer button {display: flex;align-items: center;font-size: 0.9em;- margin-right: 15px;+ margin-inline-end: 15px;cursor: pointer;}.chat-option input[type="checkbox"] {- margin-right: 5px;+ margin-inline-end: 5px;}/* Style for thinking process in chat responses */diff --git a/apps/client/src/stylesheets/table.css b/apps/client/src/stylesheets/table.cssindex 8f187dd881..1579a68538 100644--- a/apps/client/src/stylesheets/table.css+++ b/apps/client/src/stylesheets/table.css@@ -117,7 +117,7 @@/* Cell */.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left {- margin-right: var(--cell-editing-border-width);+ margin-inline-end: var(--cell-editing-border-width);}.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left,diff --git a/apps/client/src/stylesheets/theme-next/base.css b/apps/client/src/stylesheets/theme-next/base.cssindex 1549c9f863..bcadc35178 100644--- a/apps/client/src/stylesheets/theme-next/base.css+++ b/apps/client/src/stylesheets/theme-next/base.css@@ -357,13 +357,13 @@ li.dropdown-item a.dropdown-item-button:focus-visible {}#toast-container .toast:not(.no-title) .bx {- margin-right: 0.5em;+ margin-inline-end: 0.5em;font-size: 1.1em;opacity: 0.85;}#toast-container .toast.no-title .bx {- margin-right: 0;+ margin-inline-end: 0;font-size: 1.3em;}diff --git a/apps/client/src/stylesheets/theme-next/dialogs.css b/apps/client/src/stylesheets/theme-next/dialogs.cssindex 967689599e..882e0b9429 100644--- a/apps/client/src/stylesheets/theme-next/dialogs.css+++ b/apps/client/src/stylesheets/theme-next/dialogs.css@@ -56,7 +56,7 @@}.modal .modal-header .help-button {- margin-right: 0;+ margin-inline-end: 0;font-size: calc(var(--modal-control-button-size) * .75);font-family: unset;font-weight: bold;@@ -141,7 +141,7 @@ div.tn-tool-dialog {/* Search box wrapper */.jump-to-note-dialog .input-group {- margin-right: 16px;+ margin-inline-end: 16px;}.jump-to-note-dialog .input-group:hover {@@ -419,5 +419,5 @@ div.tn-tool-dialog {}.note-type-chooser-dialog div.note-type-dropdown .dropdown-item span.bx {- margin-right: .25em;+ margin-inline-end: .25em;}\ No newline at end of filediff --git a/apps/client/src/stylesheets/theme-next/llm-chat.css b/apps/client/src/stylesheets/theme-next/llm-chat.cssindex a56ad217ec..da5b478953 100644--- a/apps/client/src/stylesheets/theme-next/llm-chat.css+++ b/apps/client/src/stylesheets/theme-next/llm-chat.css@@ -23,7 +23,7 @@}.chat-message.assistant-message {- margin-right: auto;+ margin-inline-end: auto;}.message-avatar {@@ -33,7 +33,7 @@display: flex;align-items: center;justify-content: center;- margin-right: 8px;+ margin-inline-end: 8px;}.user-message .message-avatar {diff --git a/apps/client/src/stylesheets/theme-next/pages.css b/apps/client/src/stylesheets/theme-next/pages.cssindex 7efc741f5b..d0c092321d 100644--- a/apps/client/src/stylesheets/theme-next/pages.css+++ b/apps/client/src/stylesheets/theme-next/pages.css@@ -52,7 +52,7 @@background-color: #f5f5f5;}.google-login-btn img {- margin-right: 10px;+ margin-inline-end: 10px;width: 18px;height: 18px;}@@ -217,7 +217,7 @@ body.desktop .option-section:not(.tn-no-card) {--bs-border-width: 2px;margin-inline-start: calc(var(--options-card-padding) * -1);- margin-right: calc(var(--options-card-padding) * -1);+ margin-inline-end: calc(var(--options-card-padding) * -1);opacity: 1;color: var(--root-background);}diff --git a/apps/client/src/stylesheets/theme-next/ribbon.css b/apps/client/src/stylesheets/theme-next/ribbon.cssindex 3957bb1e28..e9af8df885 100644--- a/apps/client/src/stylesheets/theme-next/ribbon.css+++ b/apps/client/src/stylesheets/theme-next/ribbon.css@@ -95,7 +95,7 @@ div.promoted-attributes-container {/* Note type dropdown */ul.note-type-dropdown .check {- margin-right: 6px;+ margin-inline-end: 6px;}ul.note-type-dropdown li.dropdown-item {diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.cssindex ce4a3e4eb8..cdb9bae098 100644--- a/apps/client/src/stylesheets/theme-next/shell.css+++ b/apps/client/src/stylesheets/theme-next/shell.css@@ -539,7 +539,7 @@ div.quick-search .search-button {justify-content: center;width: 25px;height: 25px;- margin-right: 8px;+ margin-inline-end: 8px;border-radius: 50%;padding: 0;color: var(--quick-search-color) !important;@@ -734,7 +734,7 @@ body.mobile .fancytree-node > span {}#left-pane .tree-item-button {- margin-right: 6px;+ margin-inline-end: 6px;border: unset;border-radius: 50%;background: var(--left-pane-item-action-button-background);@@ -1221,7 +1221,7 @@ body.mobile .note-title {}.title-row > *:first-child {- margin-right: 0;+ margin-inline-end: 0;}.title-row > *:nth-child(2) {@@ -1312,7 +1312,7 @@ body.mobile .note-title {/* The promoted attributes section */div.promoted-attributes-container {display: flex;- margin-right: 10%;+ margin-inline-end: 10%;padding: 6px 0;gap: 8px;align-items: stretch;@@ -1400,7 +1400,7 @@ div.promoted-attribute-cell .tn-checkbox {/* Relocate the checkbox before the label */div.promoted-attribute-cell.promoted-attribute-label-boolean > div:first-of-type {order: -1;- margin-right: 1.5em;+ margin-inline-end: 1.5em;}/* The element containing the "new attribute" and "remove this attribute button" */@@ -1408,7 +1408,7 @@ div.promoted-attribute-cell .multiplicity:has(span) {--icon-button-size: 24px;margin-inline-start: 8px;- margin-right: calc(var(--pa-card-padding-left) - var(--pa-card-padding-right));+ margin-inline-end: calc(var(--pa-card-padding-left) - var(--pa-card-padding-right));font-size: 0; /* Prevent whitespaces creating a gap between buttons */display: flex;}@@ -1700,7 +1700,7 @@ div.find-replace-widget div.find-widget-found-wrapper > span {}.replace-widget-box > * {- margin-right: unset !important;+ margin-inline-end: unset !important;}div.replace-widget-box button.btn.btn-sm {@@ -1807,7 +1807,7 @@ div.find-replace-widget div.find-widget-found-wrapper > span {.excalidraw .dropdown-menu .dropdown-menu-container > div:not([class]):not(:last-child) {margin-inline-start: calc(var(--padding) * var(--space-factor) * -1) !important;- margin-right: calc(var(--padding) * var(--space-factor) * -1) !important;+ margin-inline-end: calc(var(--padding) * var(--space-factor) * -1) !important;}.excalidraw .dropdown-menu:before {diff --git a/apps/client/src/stylesheets/tree.css b/apps/client/src/stylesheets/tree.cssindex 29854e8618..00e1319364 100644--- a/apps/client/src/stylesheets/tree.css+++ b/apps/client/src/stylesheets/tree.css@@ -59,7 +59,7 @@ span.fancytree-node.fancytree-hide {line-height: 1;position: relative;top: 2px;- margin-right: 5px;+ margin-inline-end: 5px;}.fancytree-loading span.fancytree-expander {diff --git a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts b/apps/client/src/widgets/attribute_widgets/attribute_detail.tsindex cdb7c7b438..7ce3372b9b 100644--- a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts+++ b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts@@ -176,7 +176,7 @@ const TPL = /*html*/`<div class="attr-save-delete-button-container"><button class="btn btn-primary btn-sm attr-save-changes-and-close-button"- style="flex-grow: 1; margin-right: 20px">+ style="flex-grow: 1; margin-inline-end: 20px">${t("attribute_detail.save_and_close")}</button><button class="btn btn-secondary btn-sm attr-delete-button">diff --git a/apps/client/src/widgets/bulk_actions/BulkAction.tsx b/apps/client/src/widgets/bulk_actions/BulkAction.tsxindex 0f629b4bc1..fd151aa170 100644--- a/apps/client/src/widgets/bulk_actions/BulkAction.tsx+++ b/apps/client/src/widgets/bulk_actions/BulkAction.tsx@@ -12,8 +12,8 @@ interface BulkActionProps {// Define styles as constants to prevent recreationconst flexContainerStyle = { display: "flex", alignItems: "center" } as const;-const labelStyle = { marginRight: "10px" } as const;-const textStyle = { marginRight: "10px", marginInlineStart: "10px" } as const;+const labelStyle = { marginInlineEnd: "10px" } as const;+const textStyle = { marginInlineEnd: "10px", marginInlineStart: "10px" } as const;const BulkAction = memo(({ label, children, helpText, bulkAction }: BulkActionProps) => {return (diff --git a/apps/client/src/widgets/buttons/attachments_actions.ts b/apps/client/src/widgets/buttons/attachments_actions.tsindex bb49b2178f..681973a28e 100644--- a/apps/client/src/widgets/buttons/attachments_actions.ts+++ b/apps/client/src/widgets/buttons/attachments_actions.ts@@ -28,7 +28,7 @@ const TPL = /*html*/`position: relative;top: 3px;font-size: 120%;- margin-right: 5px;+ margin-inline-end: 5px;}.attachment-actions .dropdown-item[disabled], .attachment-actions .dropdown-item[disabled]:hover {diff --git a/apps/client/src/widgets/buttons/global_menu.css b/apps/client/src/widgets/buttons/global_menu.cssindex 0fd1c69888..8ffbc2ae15 100644--- a/apps/client/src/widgets/buttons/global_menu.css+++ b/apps/client/src/widgets/buttons/global_menu.css@@ -89,14 +89,14 @@ button.global-menu-button {.global-menu .zoom-state {margin-inline-start: 5px;- margin-right: 5px;+ margin-inline-end: 5px;}.global-menu .dropdown-item .bx {position: relative;top: 3px;font-size: 120%;- margin-right: 6px;+ margin-inline-end: 6px;}/* #region Update available */diff --git a/apps/client/src/widgets/collections/board/index.css b/apps/client/src/widgets/collections/board/index.cssindex 9f16b45579..318b645ab8 100644--- a/apps/client/src/widgets/collections/board/index.css+++ b/apps/client/src/widgets/collections/board/index.css@@ -146,7 +146,7 @@}.board-view-container .board-note .icon {- margin-right: 0.25em;+ margin-inline-end: 0.25em;display: inline;}@@ -269,7 +269,7 @@}.board-new-item .icon {- margin-right: 0.25em;+ margin-inline-end: 0.25em;}.board-add-column {@@ -296,7 +296,7 @@}.board-add-column .icon {- margin-right: 0.5em;+ margin-inline-end: 0.5em;font-size: 1.2em;}diff --git a/apps/client/src/widgets/dialogs/bulk_actions.css b/apps/client/src/widgets/dialogs/bulk_actions.cssindex 5f103feea9..6b8400263c 100644--- a/apps/client/src/widgets/dialogs/bulk_actions.css+++ b/apps/client/src/widgets/dialogs/bulk_actions.css@@ -4,7 +4,7 @@.bulk-actions-dialog .bulk-available-action-list button {padding: 2px 7px;- margin-right: 10px;+ margin-inline-end: 10px;margin-bottom: 5px;}diff --git a/apps/client/src/widgets/find.ts b/apps/client/src/widgets/find.tsindex 68d61541fe..d694d087ad 100644--- a/apps/client/src/widgets/find.ts+++ b/apps/client/src/widgets/find.ts@@ -32,7 +32,7 @@ const TPL = /*html*/`}.find-widget-box > *, .replace-widget-box > *{- margin-right: 15px;+ margin-inline-end: 15px;}.find-widget-box, .replace-widget-box {@@ -167,7 +167,7 @@ export default class FindWidget extends NoteContextAwareWidget {if (isIMEComposing(e.originalEvent as KeyboardEvent)) {return;}-+if ((e.metaKey || e.ctrlKey) && (e.key === "F" || e.key === "f")) {// If ctrl+f is pressed when the findbox is shown, select the// whole input to finddiff --git a/apps/client/src/widgets/note_icon.css b/apps/client/src/widgets/note_icon.cssindex 8dbea40b55..acfbfaa033 100644--- a/apps/client/src/widgets/note_icon.css+++ b/apps/client/src/widgets/note_icon.css@@ -1,6 +1,6 @@.note-icon-widget {padding-left: 7px;- margin-right: 0;+ margin-inline-end: 0;width: 50px;height: 50px;}diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsxindex 6393dfb10e..35e755c804 100644--- a/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx+++ b/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx@@ -263,7 +263,7 @@ function AncestorOption({ note, ...restProps}: SearchOptionProps) {placeholder={t("ancestor.placeholder")}/>- <div style="margin-inline-start: 10px; margin-right: 10px">{t("ancestor.depth_label")}:</div>+ <div style="margin-inline-start: 10px; margin-inline-end: 10px">{t("ancestor.depth_label")}:</div><FormSelectvalues={options}keyProperty="value" titleProperty="label"diff --git a/apps/client/src/widgets/ribbon/style.css b/apps/client/src/widgets/ribbon/style.cssindex 31c996dd52..c4809c853f 100644--- a/apps/client/src/widgets/ribbon/style.css+++ b/apps/client/src/widgets/ribbon/style.css@@ -70,7 +70,7 @@.ribbon-button-container {display: flex;border-bottom: 1px solid var(--main-border-color);- margin-right: 5px;+ margin-inline-end: 5px;}.ribbon-button-container > * {@@ -82,7 +82,7 @@.ribbon-body {border-bottom: 1px solid var(--main-border-color);margin-inline-start: 10px;- margin-right: 5px; /* needs to have this value so that the bottom border is the same width as the top one */+ margin-inline-end: 5px; /* needs to have this value so that the bottom border is the same width as the top one */}.ribbon-body.active {@@ -105,7 +105,7 @@.basic-properties-widget > * {margin-top: 9px;margin-bottom: 2px;- margin-right: 30px;+ margin-inline-end: 30px;}.note-type-container,@@ -309,7 +309,7 @@/* #region Owned Attributes */.attribute-list {margin-inline-start: 7px;- margin-right: 7px;+ margin-inline-end: 7px;margin-top: 5px;margin-bottom: 2px;position: relative;@@ -359,7 +359,7 @@}.book-properties-widget input[type="checkbox"] {- margin-right: 5px;+ margin-inline-end: 5px;}.book-properties-widget label {@@ -446,7 +446,7 @@position: relative;top: 3px;font-size: 120%;- margin-right: 5px;+ margin-inline-end: 5px;}.note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover {diff --git a/apps/client/src/widgets/tab_row.ts b/apps/client/src/widgets/tab_row.tsindex 0d248fa5af..548dd7cd1b 100644--- a/apps/client/src/widgets/tab_row.ts+++ b/apps/client/src/widgets/tab_row.ts@@ -247,7 +247,7 @@ const TAB_ROW_TPL = `}.tab-row-widget .note-tab[is-mini][active] .note-tab-close {margin-inline-start: auto;- margin-right: auto;+ margin-inline-end: auto;}@-moz-keyframes note-tab-was-just-added {to {