Skip to content

Commit 14bbcc2

Browse files
committed
Fix #763 image zoom conflict with external images
1 parent 7c79e2f commit 14bbcc2

File tree

8 files changed

+21
-16
lines changed

8 files changed

+21
-16
lines changed

Minimal.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3817,16 +3817,18 @@ body {
38173817
/* Image zoom */
38183818
/* MIT License | Copyright (c) Stephan Ango (@kepano) */
38193819
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content div:not(.canvas-node-content) img {
3820-
max-width: 100%;
38213820
cursor: zoom-in;
38223821
}
38233822
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content img:active {
38243823
cursor: zoom-out;
3824+
max-width: 100%;
3825+
z-index: 900;
38253826
}
3827+
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content .markdown-source-view.mod-cm6 .cm-content > img[contenteditable=false]:active,
38263828
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content .markdown-preview-view img[referrerpolicy=no-referrer]:active {
38273829
background-color: var(--background-primary);
3828-
padding: 10px;
38293830
}
3831+
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content .markdown-source-view.mod-cm6 .cm-content > img[contenteditable=false]:active,
38303832
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content .markdown-preview-view img[referrerpolicy=no-referrer]:active,
38313833
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type=markdown] .view-content .image-embed:not(.canvas-node-content):active {
38323834
--container-img-width: 100%;

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Minimal",
3-
"version": "7.7.6",
3+
"version": "7.7.7",
44
"minAppVersion": "1.6.1",
55
"author": "@kepano",
66
"authorUrl": "https://twitter.com/kepano",

src/css/main.css

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/main.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/main.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/features/image-zoom.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33

44
body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type="markdown"] .view-content {
55
div:not(.canvas-node-content) img {
6-
max-width:100%;
7-
cursor:zoom-in;
6+
cursor: zoom-in;
87
}
98
img:active {
10-
cursor:zoom-out;
9+
cursor: zoom-out;
10+
max-width: 100%;
11+
z-index: 900;
1112
}
13+
.markdown-source-view.mod-cm6 .cm-content > img[contenteditable=false]:active,
1214
.markdown-preview-view img[referrerpolicy='no-referrer']:active {
13-
background-color:var(--background-primary);
14-
padding:10px;
15+
background-color: var(--background-primary);
1516
}
17+
.markdown-source-view.mod-cm6 .cm-content > img[contenteditable=false]:active,
1618
.markdown-preview-view img[referrerpolicy='no-referrer']:active,
1719
.image-embed:not(.canvas-node-content):active {
1820
--container-img-width: 100%;
1921
--container-img-max-width: 100%;
20-
aspect-ratio:unset;
22+
aspect-ratio: unset;
2123
cursor:zoom-out;
2224
display:block;
2325
z-index:200;
@@ -61,7 +63,6 @@ body:not(.zoom-off):not(.is-mobile) .workspace-leaf-content[data-type="markdown"
6163
position:absolute;
6264
opacity:1;
6365
}
64-
6566
.markdown-source-view.mod-cm6 .cm-content > [contenteditable=false]:has(.image-embed:not(.canvas-node-content):active) {
6667
contain: unset !important;
6768
}

theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)