Skip to content

Node outlines #3156

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!

Activity

  1. maxkfranz commented on Aug 30, 2023

    @maxkfranz
    Member

    The screenshots don't seem to work in the OP anymore.

  2. stale commented on Sep 13, 2023

    @stale

    This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

  3. stale commented on Sep 29, 2023

    @stale

    This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

  4. stale commented on Oct 13, 2023

    @stale

    This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

  5. added
    pinnedA long-lived issue, such as a discussion
    and removed on Oct 18, 2023
  6. maxkfranz commented on Oct 18, 2023

    @maxkfranz
    Member

    Pinned

  7. added this to the 3.28.0 milestone on Oct 31, 2023
  8. maxkfranz commented on Oct 31, 2023

    @maxkfranz
    Member

    Assigned to the 3.28.0 milestone.

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

    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