tachyons icon indicating copy to clipboard operation
tachyons copied to clipboard

[FEATURE REQUEST] Object Fit

Open ckizer opened this issue 4 years ago • 1 comments

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

ckizer avatar Jan 24 '21 05:01 ckizer