Skip to content

Border token: Style selector for "solid | dashed" improvement #3789

@julien-deramond

Description

@julien-deramond

Note: I've checked existing issues but haven't found really something close to this. Hopefully, it's not a duplicate.

Context

Let's consider the following configuration:

Token Type Name Value
Border Width "border-width-4" 4
Border Radius "border-radius-4" 4
Color black #000
Image

I haven't seen any "Stroke style" or "Border style" token types, so my configuration looks good, and is ready to create a new "Border" token:

Image

Here I can see "solid | dashed", so I could input the value manually, but there's also a select.

The presence of the select made me think that I could maybe create a token with a "Text" or "Other" type:

Token Type Name Value
Other "other-solid" "solid"
Text "text-dashed" "dashed"
Image

But still, it doesn't work.

Suggestion

The select control created doubt: its presence implied for me that I could pick an existing token whose value matches those literals. Because the dropdown lists allowed values, I expected to be able to reuse my "Text", "Other", or any other token types able to set "solid" or "dashed" values.

To avoid that confusion, the control could either show only the literal options (e.g., "dark", "solid") or explicitly indicate that token references aren’t supported and be disabled for instance. If the select displayed just the literal strings, it would be immediately clear that reusing another token isn’t possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    📥 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions