.res_'.$resource_id.'{background-image:url('.$row['resource_server_name'].'?w=300'.ZDEF_TEST_LINK_AND.');}'; // no retina display this small $widths=[480,768,1366,1920]; //$maxWidth=$theWidgets['res_'.$resource_id]['classList'] foreach($widths as $width){ $selector='.res_'; echo '@media print, only screen and (min-width:'.$width.'px){'; echo '.res_'.$resource_id.'{background-image:url('.$row['resource_server_name'].'?w='.$width.ZDEF_TEST_LINK_AND.');}'; echo '@media print, only screen and (-webkit-min-device-pixel-ratio:1.5), screen and (min-resolution: 144dpi), screen and (min-resolution: 144dppx){'; echo '.res_'.$resource_id.'{background-image:url('.$row['resource_server_name'].'?w='.round($width*1.5).ZDEF_TEST_LINK_AND.');}'; echo '}'; echo '@media print, only screen and (-webkit-min-device-pixel-ratio:2), screen and (min-resolution: 192dpi), screen and (min-resolution: 192dppx){'; echo '.res_'.$resource_id.'{background-image:url('.$row['resource_server_name'].'?w='.round($width*2).ZDEF_TEST_LINK_AND.');}'; echo '}'; } echo ''; ?>