Skip to content

Commit

Permalink
feat(jdanielmourao#218): add option to disable image desaturation
Browse files Browse the repository at this point in the history
  • Loading branch information
antoKeinanen committed Apr 14, 2024
1 parent 750bcfd commit 163271e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 13 additions & 1 deletion src/scss/info/style-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name: Sanctum
id: sanctum
collapsed: false
settings:
-
id: light-mode-contrast-mode
Expand Down Expand Up @@ -1473,12 +1474,23 @@ settings:
id: wrap-kanban-lanes
title: Wrap kanban lanes
type: class-toggle
-
id: image
title: Image
type: heading
level: 1
collapsed: true
-
id: desaturate-images
title: Desaturate images in dark mode
type: class-toggle
default: true
-
id: advanced
title: Advanced Settings
type: heading
level: 1
collapsed: false
collapsed: true
-
id: no-sanctum-icons
title: Disable custom icons
Expand Down
10 changes: 4 additions & 6 deletions src/scss/obsidian/images.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// @use 'variables/root';

.theme-dark .markdown-rendered img:not(:hover),
.theme-dark .workspace-leaf-content img:not(:hover) {
body.desaturate-images .image-embed {
opacity: 0.7;
transition: opacity var(--duration-slow-2) var(--motion-entrance-expressive);
}

.theme-dark .markdown-rendered img:hover,
.theme-dark .workspace-leaf-content img:hover {
transition: opacity var(--duration-slow-2) var(--motion-entrance-expressive);
&:hover {
opacity: 1;
}
}

.markdown-rendered img,
Expand Down

0 comments on commit 163271e

Please sign in to comment.