body:not(.is-mobile):not(.zoom-off) .workspace-leaf-content[data-type="markdown"] {
  .image-embed:not(.canvas-node-content),
  img[referrerpolicy="no-referrer"],
  .cm-content > img {
    cursor: zoom-in;
  }
}

body:not(.is-mobile):not(.zoom-off) .markdown-preview-view {
  .image-embed:not(.canvas-node-content):active img,
  img[referrerpolicy="no-referrer"]:active {
    position: fixed;
    z-index: 1000;
    cursor: zoom-out;
    inset: 0;
    background-color: var(--background-primary);
    width: 100%;
    height: 100%;
    max-height: unset;
    object-fit: contain;
  }
}

body:not(.is-mobile):not(.zoom-off) .markdown-source-view {
  .image-embed:not(.canvas-node-content):active,
  .cm-content > img:active {
    position: fixed;
    z-index: 1000;
    cursor: zoom-out;
    inset: var(--header-height) 0 0;
    background-color: var(--background-primary);
  }

  .image-embed:not(.canvas-node-content):active {
    display: flex;
    justify-content: center;

    img {
      background-color: transparent;
      width: 100%;
      height: auto;
      max-height: unset;
      object-fit: contain;
    }
  }

  .cm-content > img:active {
    width: 100%;
    height: calc(100% - var(--header-height));
    max-height: unset;
    object-fit: contain;
  }
}
