Fix images not being constrained to field width
Appears to have regressed in #2071. I'd used 'inherit' so that the default editable styling would impose a 100% limit, but it appears that variable interpolation prevents the parent styling from being applied.
This commit is contained in:
parent
ff1f5f9f7a
commit
cfe1b79737
@ -4,8 +4,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
<style lang="scss">
|
||||
:global(img:not(.mathjax)) {
|
||||
max-width: var(--editor-default-max-width);
|
||||
max-height: var(--editor-default-max-height);
|
||||
max-width: var(--editor-default-max-width, inherit);
|
||||
max-height: var(--editor-default-max-height, inherit);
|
||||
|
||||
&:is([data-editor-shrink="true"]) {
|
||||
max-width: var(--editor-shrink-max-width);
|
||||
|
@ -94,13 +94,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
`${maxHeight}px`,
|
||||
);
|
||||
} else {
|
||||
document.documentElement.style.setProperty(
|
||||
document.documentElement.style.removeProperty(
|
||||
"--editor-default-max-width",
|
||||
"inherit",
|
||||
);
|
||||
document.documentElement.style.setProperty(
|
||||
document.documentElement.style.removeProperty(
|
||||
"--editor-default-max-height",
|
||||
"inherit",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user