max-width:100% issue #6241
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As in this issue I expand the issue to a more general issue, that's when the container of the
<form>has awidth:100%the code editor simply applies whateverwidthit needs, in pixels, to render the full width of the editor and doing so no horizontal scrolling is present, so it means that the editor overflows and breaks any structural design where thewidthof the container is actually dynamic instead of static.Modern CSS frameworks do use dynamic sizes to adapt the contents to different screen sizes without having ever to apply static pixel sizes but this concept seems missing from CodeMirror.
My workaround is to simply add
overflow-x: autoon the container of the<form>which kind of fixes it in a way and breaks it in another, like there's no more an appropriate scrollbar(on my notebook I can scroll horizontally with the touchpad gesture or going with the carrier bar to the right) and some text at the extreme end is cut out(like few characters, all in the ASCII range).If asked I will try to post an example of my case and the workaround.
Later on I'm going to try also some extra fixes to better work around this silly issue.
I frankly have no idea what this is supposed to mean.
Setting the parent node to
width: 100%appears to have no adverse effects at all. So yes, please provide a minimal example. If the parent or grandparent isdisplay: flex, you'll probably have to add an additional wrapper element around the editor to make it size properly.@thepraI'm not 100% sure what you mean either but I'm guessing you needmin-width: 0on the CodeMirror element or something containing it, at least if it's inside adisplay: flexelement.This is non-intuitive and confuses me almost every time I run into it, but it's because the default is unfortunately
min-width: autofor a row flex item: https://stackoverflow.com/a/36247448/200224