Skip to content

Build your personal knowledge base with Trilium Notes

refactor(client): split revisions CSS into file

Elian Doran7779acc7bcde
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index ea55db0410..5db4b1582d 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -1686,46 +1686,6 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
body.mobile .modal-dialog.modal-dialog-scrollable {
height: unset;
}
-
- body.mobile .revisions-dialog .modal-dialog {
- height: 95vh;
- }
-
- body.mobile .revisions-dialog .modal-body {
- height: 100% !important;
- flex-direction: column;
- padding: 0;
- }
-
- body.mobile .revisions-dialog .revision-list {
- height: unset;
- max-height: 20vh;
- border-bottom: 1px solid var(--main-border-color) !important;
- padding: 0 1em;
- }
-
- body.mobile .revisions-dialog .modal-body > .revision-content-wrapper {
- flex-grow: 1;
- height: 100%;
- overflow: auto;
- margin: 0;
- }
-
- body.mobile .revisions-dialog .modal-body > .revision-content-wrapper > div:first-of-type {
- flex-direction: column;
- }
-
- body.mobile .revisions-dialog .revision-title {
- font-size: 1rem;
- }
-
- body.mobile .revisions-dialog .revision-title-buttons {
- text-align: center;
- }
-
- body.mobile .revisions-dialog .revision-content {
- padding: 0.5em;
- }
}
/* Mobile, tablet mode */
diff --git a/apps/client/src/widgets/dialogs/revisions.css b/apps/client/src/widgets/dialogs/revisions.css
new file mode 100644
index 0000000000..91c3af11c7
--- /dev/null
+++ b/apps/client/src/widgets/dialogs/revisions.css
@@ -0,0 +1,41 @@
+body.mobile .revisions-dialog {
+ .modal-dialog {
+ height: 95vh;
+ }
+
+ .modal-body {
+ height: 100% !important;
+ flex-direction: column;
+ padding: 0;
+ }
+
+ .revision-list {
+ height: unset;
+ max-height: 20vh;
+ border-bottom: 1px solid var(--main-border-color) !important;
+ padding: 0 1em;
+ }
+
+ .modal-body > .revision-content-wrapper {
+ flex-grow: 1;
+ height: 100%;
+ overflow: auto;
+ margin: 0;
+ }
+
+ .modal-body > .revision-content-wrapper > div:first-of-type {
+ flex-direction: column;
+ }
+
+ .revision-title {
+ font-size: 1rem;
+ }
+
+ .revision-title-buttons {
+ text-align: center;
+ }
+
+ .revision-content {
+ padding: 0.5em;
+ }
+}
\ No newline at end of file
diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx
index e20c4c978f..fd2dd9a167 100644
--- a/apps/client/src/widgets/dialogs/revisions.tsx
+++ b/apps/client/src/widgets/dialogs/revisions.tsx
@@ -20,6 +20,7 @@ import ActionButton from "../react/ActionButton";
import options from "../../services/options";
import { useTriliumEvent } from "../react/hooks";
import { diffWords } from "diff";
+import "./revisions.css";
export default function RevisionsDialog() {
const [ note, setNote ] = useState<FNote>();