responsify-wp
responsify-wp copied to clipboard
Img and Picture output only...
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 ); } }
The ability to add more css rules? Like background-size: cover
and so on?
Yes, so that the CSS output would place the responsive background images over a specific selector or class....
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' ) );
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