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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more