Skip to content

Increase legibility by adding margin only at the bottom of a group of wrapped lines, instead of generally increasing line-height #98410

Closed

Description

Hello,

currently the only option to influence line spacing is editor.lineHeight, which increases the height of every line displayed in the editor. It does not differentiate between actual lines or such that resulted from wrapping text.

I propose to have an additional editor setting (for example editor.lineMarginBottom) to add margin (in px) at the bottom of a group of lines of wrapped text, as well as single non-wrapped lines. This allows to visually group wrapped lines and increase legibility.

VS Code default: Screenshot of the default setting ("editor.lineHeight": 0):
vsc_default

Proposed MarginBottom: Mockup of "editor.lineMarginBottom": 22 with default line-height:
vsc_linemarginbottom
Note how there is no added space between the <h5>… and the ipsum</h5> in line 34, due to the line wrap. However, there is an added margin at the bottom of line 35, because of the longer lorem ipsum text being placed on a new line (36).

LineHeight increase: Screenshot of ("editor.fontSize": 16, "editor.lineHeight": 38):
vsc_lineheight

Since the default can feel a bit cramped, a lot of users seem to increase the line-height.
In comparison to the margin-bottom proposal mockup this feels visually noisy and it becomes harder to identify groups of wrapped lines, which belong together.

The proposed setting creates a middle ground between the two showcased examples. It could be used twofold: Together with or instead of an increased line-height.

=====

Foreseen difficulty:
VS Code does not seem to group wrapped lines in the DOM. I am not sure if such grouping could be added to apply the margin to the parent div of the wrapped lines.
vsc_div view-line

=====

Added setting to treat manual line breaks within tags like wrapped lines
I am again not sure about the feasibility, but It would be visually helpful if manual line-breaks within tags could be treated similarly to the line wrapped text lines described above. By that the margin would only be applied after the tag is closed and ignored for the lines within the tag. This increases the legibility of cohesive attributes. The setting could be called "editor.lineMarginBottomWithinTags": false.

Especially when writing accessible HTML5, using modern JavaScript frameworks or utility class-based CSS frameworks the number of attributes is ever-increasing and manual line breaks are used as a means to provide structure.

VS Code default:
vsc_default2

Proposed MarginBottom: Mockup of "editor.lineMarginBottom": 22, "editor.lineMarginBottomWithinTags": false that
vsc_taggrouping

LineHeight increase:
vsc_lineheight2
This example shows how the cohesiveness is visually lost due to the added space.

I tried to keep the examples minimal. Just imagine this additional visual structure being applied to a cluttered accessible and styled web app navigation in Vue or React with key presses, click events etc.

Thanks a lot in advance.

Activity

  1. added
    editor-rendering
    feature-request
    on Jun 1, 2020
  2. vscode-triage-bot commented on Jun 1, 2020

    @vscode-triage-bot

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  3. vscode-triage-bot commented on Jul 22, 2020

    @vscode-triage-bot

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding

  4. vscode-triage-bot commented on Aug 2, 2020

    @vscode-triage-bot

    🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. locked and limited conversation to collaborators on Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-renderingfeature-request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions