Skip to content

[FEATURE REQUEST] Object Fit #691

@ckizer

Description

@ckizer

Loving Tachyons so far.

I've got some feature request ideas. In this example I've been using object-fit: cover; to make the img tag stretch the photo to full height. Using object fit has become more common in development lately. Unfortunately Tachyons only support .cover which only affects background image.

CleanShot 2021-01-23 at 21 19 37@2x

Ideally I'd love to see something like this included in tachyons:

.object-cover {
    object-fit: cover;
}
.object-contain {
    object-fit: contain;
}
.object-fill {
    object-fit: fill;
}
.object-contain {
    object-fit: contain;
}
.object-scale-down {
    object-fit: scale-down;
}
.object-none {
    object-fit: none;
}

It's very useful when scaling images

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