responsify-wp icon indicating copy to clipboard operation
responsify-wp copied to clipboard

Img and Picture output only...

Open IvanPr opened this issue 7 years ago • 4 comments

It would be awesome to allow the plugin to produce the set of CSS background-image output also:

Something like: background-image: url( http://test.dev/wp-content/uploads/2017/07/Megapolis.jpg); background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; } @media (max-width: 1024px) { #page-header { background-image: url( http://test.dev/wp-content/uploads/2017/07/Megapolis-1024x683.jpg ); } } @media (max-width: 768px) { #page-header { background-image: url( http://test.dev/wp-content/uploads/2017/07/Megapolis-768x512.jpg ); } }

IvanPr avatar Oct 31 '17 09:10 IvanPr

The ability to add more css rules? Like background-size: cover and so on?

stefanledin avatar Oct 31 '17 09:10 stefanledin

Yes, so that the CSS output would place the responsive background images over a specific selector or class....

IvanPr avatar Oct 31 '17 19:10 IvanPr

So you don't wanna do this?

<style>
    .header {
        background-size: cover;
    }
</style>

Instead you'd like to pass the css rules as arguments to the rwp_style() function?

echo rwp_style( $id, array( 'selector' => '.header' ) );

stefanledin avatar Nov 17 '17 12:11 stefanledin

The background-size: cover; is absolutely great. I was sating it would be great if the plugin could be used to produce the background-size: cover; CSS output. Not just and

IvanPr avatar Nov 17 '17 18:11 IvanPr