Description
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:
4px outline with 2px offset:
4px dashed outline with 4px offset:
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!