unpic-img icon indicating copy to clipboard operation
unpic-img copied to clipboard

Using unstyled prop with placeholders

Open sjaakvdbrom opened this issue 9 months ago • 0 comments

When using the unstyled prop it removes all the inline styles, including the background-image for the placeholders. It would be great if there was a way to still use a placeholder while removing all other inline styles.

For example I am using the picture element with multiple sources so that I can have different images and aspect ratios for all devices. For this I am using the prop: unstyled so the image does not get locked into one aspect ratio. The drawback of this is now that I cannot use placeholders anymore.

Maybe a possibility would be to make 'unstyled' into the following:

boolean | 'background' | undefined, where background will keep the inline styles for placeholders.

sjaakvdbrom avatar May 18 '24 20:05 sjaakvdbrom