DEV Community

Julio Suarez (Juls Schwartz)
Julio Suarez (Juls Schwartz)

Posted on

2 1

¿Sabes cuanto mide un "CSS Pixel"?

A traves de las pantallas, existe una medida virtual, que es el Pixel CSS, es compleja su definición, dejo unas ligas sobre mi investigación, luego escribo mas a detalle algo sobre el concepto, por que es muy necesario entenderlo bien cuando nos piden algun proyecto en html canvas.

https://drafts.csswg.org/css-values/#absolute-lengths

The term CSS pixel is synonymous with the CSS unit of absolute length px — which is normatively defined as being exactly 1/96th of 1 inch.

Sin embargo, esta norma no se aplica estrictamente, por eso mejor no la compruebes con tu regla, pero tranquilo no te vuelvas loco por eso, simplemente relajate y dejalo ser.

https://riptutorial.com/html5-canvas/example/7515/canvas-size-and-resolution

https://www.w3.org/TR/css3-values/#reference-pixel

https://hacks.mozilla.org/2013/09/css-length-explained/

https://stackoverflow.com/questions/21680629/getting-the-physical-screen-dimensions-dpi-pixel-density-in-chrome-on-androi

https://stackoverflow.com/questions/53233096/how-to-set-html5-canvas-size-to-match-display-size-in-device-pixels

Top comments (0)

Scale globally with MongoDB Atlas. Try free.

Scale globally with MongoDB Atlas. Try free.

MongoDB Atlas is the global, multi-cloud database for modern apps trusted by developers and enterprises to build, scale, and run cutting-edge applications, with automated scaling, built-in security, and 125+ cloud regions.

Learn More

👋 Kindness is contagious

Dive into this thoughtful piece, beloved in the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A sincere "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay