I would like to add the new Google phones to the Emulated Devices in Chrome's dev tools.
Does anyone know the correct custom device settings for the Pixel 3 and Pixel 3 XL?
I would like to add the new Google phones to the Emulated Devices in Chrome's dev tools.
Does anyone know the correct custom device settings for the Pixel 3 and Pixel 3 XL?
You must enter the viewport size on the google dev center, not screen resolution. So the viewports for pixel 3 and pixel 3 xl are as below.
Pixel 3: 412 x 824 aspect ratio: 16:9 ~ Device pixel ratio: 1.7
Pixel 3 xl: 412 x 847 aspect ratio: 16:9 ~ Device pixel ratio: 1.7
you can use something like this to know you device details :
<!DOCTYPE html>
<html>
<body>
<button onclick="OutputDeviceInfo()">Click me</button>
<p id="width"></p>
<p id="height"></p>
<p id="ratio"></p>
<script>
function OutputDeviceInfo() {
let deviceWidth = window.screen.width;
let deviceHeight = window.screen.height;
let devicePixelAspectRation = window.devicePixelRatio;
document.getElementById("width").innerHTML = deviceWidth;
document.getElementById("height").innerHTML = deviceHeight;
document.getElementById("ratio").innerHTML = devicePixelAspectRation;
console.log('Width: ' + deviceWidth);
console.log('Height: ' + deviceHeight);
console.log('Pixel Ratio: ' + devicePixelAspectRation);
}
</script>
</body>
</html>
Press F12 on Chrome Browser >> Click on toggle device tool bar (on left side small mobile icon) >> click on drop-down option where you can see spme list of devices are there, you can see last option "Edit"- click on that Edit option>> click on "Add custom device" button enter the details for your targets device