Skip to content

Set Default CSS Transitions via Theme.json #62885

@bhubbard

Description

@bhubbard

What problem does this address?

CSS Transitions can be common on sites, for hover effects on buttons, links, etc. Having basic support for this in theme.json can lead to developers using them for blocks and patterns, while helping keeping them consistent for the site.

What is your proposed solution?

I would like to see some common default css transitions set via theme.json, with the ability to set custom, just like fonts and colors.

Example:

// Transition Durations
$transition-duration-fast: 0.2s;
$transition-duration-medium: 0.4s;
$transition-duration-slow: 0.6s;

// Transition Timings
$transition-timing-ease-in: ease-in;
$transition-timing-ease-out: ease-out;
$transition-timing-ease-in-out: ease-in-out;
$transition-timing-linear: linear;

// Transition Delays
$transition-delay-none: 0s;
$transition-delay-short: 0.1s;
$transition-delay-medium: 0.2s;
$transition-delay-long: 0.3s;

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions