Skip to content

Feature request: spacing and margins as 'root' theme elements #5622

Closed
@teunbrand

Description

@teunbrand

Similar to how theme(line) is the root element for all other line elements, we might make spacing and margin root elements that all other spacings/margins inherit from.

I think this has two benefits:

  • It would then become easy to make spacings and margins wider or narrower on the fly, instead of having to use e.g. theme_gray(base_size) to simulaneously scale all margins and spacings. The base_size argument also scales other stuff, like text, that you may not be interested in scaling.
  • Developers can declare specialty theme elements that scale along with the base theme in register_theme_elements(). The current solution for this problem is to inherit a spacing from an unrelated theme element and pray it doesn't interact inconveniently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions