Skip to content

Node outlines #3156

Closed
Closed
@npedrini

Description

@npedrini

Description of new feature

Following on from a few of the features mentioned in #3145 (comment), this issue proposes the addition of outlines as a new, optional node style, similar to but distinct from borders.

Node outlines would be defined by and support the same properties as borders (outline-color, outline-opacity, outline-width and outline-style), with an additional outline-offset property for offsetting the outline.

Outlines wouldn't affect the calculated node size, although bounds calculations would take outlines into account so that larger outlines don't get clipped at lower zoom levels without having to rely on the bounds-expansion property.

Here are a few mock-ups showing what outlines would look like:

2px outline with no offset:

Screen Shot 2023-08-21 at 10 26 35 PM

4px outline with 2px offset:

Screen Shot 2023-08-21 at 10 28 10 PM

4px dashed outline with 4px offset:

Screen Shot 2023-08-21 at 10 57 15 PM

Motivation for new feature

Outlines provide an additional visual indicator that can be used, amongst other things, to signal user interaction, particularly in cases where border style and/or underlays are already being used. Additionally, outlines provide a way to convey interaction in a way that doesn't obscure the node, like overlays do.

As a relatively new user of the library and first-time proposer, happy to provide additional detail if needed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinnedA long-lived issue, such as a discussion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions