Skip to content

Sizes presets for border-radius #49504

@cawa-93

Description

@cawa-93

What problem does this address?

My themes have a fixed set of border-radius values. These are complex adaptive values like clamp(2.5rem, 1.912rem + 2.941vw, 3.75rem), not simple fixed values ​​in px or rem.

  1. I cannot configure the theme so that the editor chooses a radius value from one of the preset options. He is always forced to enter some custom number.
  2. In existing controls, it is impossible to set such a complex, adaptive value, using clamp or min/max.

What is your proposed solution?

Provide presets for border.radius such as for spacing.spacingSizes

{
  "border": {
    "radius": false, // to disable custom border-radius and allow only pre-defined 👇🏻
    "radiusSizes": [
		{ "name": "Small", "slug": "small", "size": "clamp(0.625rem, 0.037rem + 2.941vw, 1.875rem)" },
		{ "name": "Big", "slug": "big", "size": "clamp(2.5rem, 1.912rem + 2.941vw, 3.75rem)" }
	]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions