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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay