Skip to content

Review padding and margins across framework #4

Open
@davestewart

Description

@davestewart

Background

On close inspection, horizontal padding is kinda off on various elements of the framework.

On some elements it's quite thin horizontally, on some structural elements there is not enough padding to provide significant contrast.

Hero

https://spectre-org.github.io/spectre-docs/docs/layout/hero.html

CleanShot 2024-09-19 at 01 04 54

Left-padding is too thin, and last-child should not pad the bottom

Lists

https://picturepan2.github.io/spectre/elements/typography.html#typography-lists

image

The spacing between related bullets is quite large, and the gap between bullet and text is too big. Also, see #24.

Labels

https://picturepan2.github.io/spectre/elements/labels.html

image
image

The x padding is a bit thin, especially on the rounded labels.

Buttons

https://picturepan2.github.io/spectre/elements/buttons.html

image

The x padding is a little thin.

Forms

https://picturepan2.github.io/spectre/elements/forms.html

image image

Inconsistent padding in form fields.

Tables

https://picturepan2.github.io/spectre/elements/tables.html

image

Padding is too thin in x, and too fat in y.

Toasts

https://picturepan2.github.io/spectre/components/toasts.html

image

Padding feels like it should be equal in x and y.

Accordions:

https://picturepan2.github.io/spectre/components/accordions.html#accordions

image

The inner text does not line up with the header.

Also, not consistent with navs:

image

Modals

https://picturepan2.github.io/spectre/components/modals.html#example-modal-1

image

Top padding looks a little squashed.

Compared to popover padding which feels more comfortable:

image

Panels

https://picturepan2.github.io/spectre/components/panels.html

image

Content x padding is a little thin.

Proposal

It would be good to:

  • make padding feel more consistent between x and y (especially on corners)
  • give structural elements more indentation
  • review size variants

It seems that padding is controlled by a variable, so it could be quite an easy win, perhaps just better defaults:

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementAn improvement to an existing feature

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions