Skip to content

Apply transitions to media/container queries [css-contain][css-transitions] #6581

@scottkellum

Description

@scottkellum

Add the ability of transitioning between @media and @contain states. This would enable fine-tune control over how things change as viewport and container sizes change with easing.

This would enable at least two things that is not possible in CSS:

  • Interpolation of multiple properties across screen/container sizes.
  • Interpolation of text on an easing curve, as opposed to linear with viewport/container unit interpolation.

Some examples to show the need for this feature. These demos are acting as if text in page modules can be interpolated based on container width units in the first column, and transitioned + eased queried properties in the second column.

Possible with container unit interpolationPossible with state transitions and easing
A demo showing The Atlantic’s home page with various entry modules scaled as if with linear interpolation. This results in text not having a good size range and the typography  is a little flat. A demo showing The Atlantic’s home page with various entry modules scaled as if with easing. The result is more rich and dynamic typography.
A Nike product demo showing product names linearly interpolated resulting on the text being too big at smaller sizes. A Nike product demo with an interpolation curve showing smaller product names that ramp up to large sizes more gradually.

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