Skip to content
This repository has been archived by the owner on Dec 11, 2017. It is now read-only.

Additional CSS line count should be narrower #83

Open
melchoyce opened this issue Sep 5, 2017 · 6 comments
Open

Additional CSS line count should be narrower #83

melchoyce opened this issue Sep 5, 2017 · 6 comments

Comments

@melchoyce
Copy link
Collaborator

Despite only having one digit per line, the line count is quite wide:

@westonruter
Copy link
Member

@melchoyce the gutter width is to give room for the error/warning icons.

@melchoyce
Copy link
Collaborator Author

Does it need that much space? And are the theme/plugin editors different because the php files aren't being linted yet?

image

@westonruter
Copy link
Member

@melchoyce yes, that's right. There isn't a linter for PHP yet (#48) so the gutter is not present.

@melchoyce
Copy link
Collaborator Author

Okay 👍

Any way we could still tighten up the space a bit?

@westonruter
Copy link
Member

Probably, but it would require some CodeMirror research. Help wanted.

@kenashworth
Copy link

kenashworth commented Sep 7, 2017

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants