Skip to content

Request: Add basic support for CSS transform (at least rotate and scale) on images #437

@youlanan

Description

@youlanan

Hi maintainers,
I'm using litehtml to render HTML/CSS to images, but I encountered a problem: I wanted to rotate an img element by 90° (or perform simple flips), but properties like transform: rotate(90deg); have no effect.
After checking the CSS support spreadsheet, I noticed that the transform property seems unimplemented or unsupported.
This limitation makes it impossible to perform even simple image manipulations, such as rotating an image by 90°, 180°, or directly flipping it horizontally/vertically in CSS.

Feature Request:

Would it be possible to add at least basic support for CSS transform on img elements, starting with:

rotate(90deg), rotate(180deg), rotate(270deg)
scaleX(-1) for horizontal flip
scaleY(-1) for vertical flip

Even partial or simplified implementation (e.g., only supporting discrete 90° rotations and flips) would greatly improve usability for lightweight embedding scenarios like ours, while keeping the engine's small footprint.
Thank you for maintaining this great lightweight engine! Any plan or interest in adding such features would be highly appreciated.
Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions