Open melchoyce opened 6 years ago
@melchoyce the gutter width is to give room for the error/warning icons.
Does it need that much space? And are the theme/plugin editors different because the php files aren't being linted yet?
@melchoyce yes, that's right. There isn't a linter for PHP yet (#48) so the gutter is not present.
Okay 👍
Any way we could still tighten up the space a bit?
Probably, but it would require some CodeMirror research. Help wanted.
CodeMirror takes the number columns width right from the CSS, so adding .CodeMirror-linenumber { min-width: 1px; }
would shrink it as much as is possible (without clipping the numbers). The column will grow with number of digits in the largest line number automatically.
(Additionally you can shave off a few more pixels with padding on that class. .CodeMirror-linenumber { min-width: 1px; padding: 0 1px; }
)
The biggest space is the 16px for the linting and hinting, which I haven't yet figured out how to shrink. Maybe there's a way to overlay the error icon onto the numbers? Worth looking into, or nah?
Despite only having one digit per line, the line count is quite wide: