Raw. We use a scale factors to create a canvas, use width and height attributes, so double the CSS pixel width and height sizes we require. A double-precision floating-point value indicating the ratio of the display's resolution in physical pixels to the resolution in CSS pixels. width = … Find out how to get started.. How the front end assets (CSS and JavaScript) are organised and compiled is discussed below. This is because by default one canvas pixel equals one CSS pixel, not one screen pixel. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. device-pixel-ratio, -o-min-device-pixel-ratio, min--moz-device-pixel-ratio, -webkit-min-device-pixel-ratio { … } In Javascript, window.devicePixelRatio can be used to obtain the same ratio, although browser support is still relatively limited. Created 9 years ago — forked from dannykeane/output.css. You should define the “no” value for this attribute in order to disable the zooming option. -webkit-device-pixel-ratio is a non-standard boolean CSS media feature which is an alternative to the standard resolution media feature.. Its value is the number of device pixels used to represent each CSS px.Although the value is a