mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 08:31:49 +00:00
fix(notes): keep image width/height on paste, scale via CSS
Preserve HTML img dimensions in note source (including large screenshots). Side-panel display still uses max-width:100% and height:auto so content fits without cropping; small logos can honor their smaller width attrs.
This commit is contained in:
1 parent
b36642994c
commit
27b2c1954f
3 files changed
+59
-73
No files matched your search
@@ -1559,16 +1559,14 @@ html[data-theme-transition] *::after {
|
||||
}
|
||||
|
||||
/*
|
||||
* Note images (lossy-but-clean paste policy):
|
||||
* - never overflow the side-panel content width
|
||||
* - ignore baked-in screenshot pixel widths (object-fit + max-width)
|
||||
* - no crop: height auto, overflow visible on wrappers
|
||||
* Note images: source keeps width/height (HTML attrs for MDX / aspect ratio).
|
||||
* Display: max-width caps screenshots to the pane; height:auto keeps ratio.
|
||||
* Do NOT force width:auto — that would ignore a 128px logo preference.
|
||||
*/
|
||||
.netcatty-mdx-content img,
|
||||
.netcatty-mdx-editor [class*="_imageWrapper_"] img,
|
||||
.netcatty-mdx-editor img {
|
||||
max-width: 100% !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
@@ -1577,11 +1575,11 @@ html[data-theme-transition] *::after {
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
/* Cap MDX image chrome when ImageNode bakes large pixel widths into styles. */
|
||||
.netcatty-mdx-editor [class*="_imageWrapper_"],
|
||||
.netcatty-mdx-editor [class*="_imageContainer_"],
|
||||
.netcatty-mdx-editor [class*="_imageControlWrapper_"] {
|
||||
max-width: 100% !important;
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
overflow: visible !important;
|
||||
box-sizing: border-box;
|
||||
|
||||
Reference in new issue
Block a user