8000 [css-transforms-2] proposal: new "transform: bend();" function · Issue #6293 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-transforms-2] proposal: new "transform: bend();" function #6293

@ramiy

Description

@ramiy

The transform property has several functions that allow elements to be transformed in two-dimensional or three-dimensional space.

This proposal aims to add a new native CSS function that let you bend elements, using the following syntax:

.element {
  transform: bend();
}

Formal syntax:

bendX( [ <angle> | <zero> ] )
bendY( [ <angle> | <zero> ] )
bendZ( [ <angle> | <zero> ] )

This concept transformations by stretching & shrinking the element from its four corners. The 2D transform (bendX() & bendY()) will bend the element on the same plane. The 3D transform (or bendZ()) will bend the element to a cylinder - the two top corners and the two bottom corners will be bent back to create a cylinder.

transform_ bend

The illustration covers positive and negative values. It covers X, Y and Z plane.

Simple example: https://codepen.io/team/amcharts/pen/gZOLGM?editors=0010

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

      0