Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Button: border radius, there's a better way. #265

@geoidesic

Description

@geoidesic

Firstly I love Attractions. I've selected it for use.

One thing that seems completely wrong to me though is the approach to button radius. The way it works is just counter-intuitive and frankly, unusable.

Problems:

  1. There's an assumption that's been made; that we want very round buttons as the norm, which is not the case, the norm is currently rectangular with custom radius.
  2. The way rectangle prop has been used where it divides the $border-radius var means that if you want square buttons mostly, you can no longer have round buttons. In other words; if you change $border-radius to make square-corner buttons, round no longer works and you cannot have any round buttons. You really want the flexibility to have both.

Solution:

  1. Start with $border-radius default being 0
  2. rectangle should not adjust $border-radius
  3. There should be a size rather than small, then we have have 5 different sizes: xs, sm, md (default), lg, xl.
  4. round should adjust border radius, not by a factor but rather by a hard-coded value proportional to the size prop, or a calculated value proportional to height, and should always render a completely round button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions