Y
Hacker News
new
|
ask
|
show
|
jobs
by
adzm
569 days ago
A pixel is defined as 1/96th of an inch in the web world so it is dependent on your dpi/scaling. There is a window.devicePixelRatio that JavaScript can use to get actual pixels.