Git Product home page Git Product logo

content-dpr-explainer's People

Contributors

eeeps avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

content-dpr-explainer's Issues

Content-DPR makes for an imperfect placeholder

See my description of the problem and a bunch of ideas about potential solutions here: httpwg/http-extensions#1102

TL;DR:

  • Rounding errors w/ Content-DPR will often cause small layout jumps, in transitions between a placeholder and a full-resolution image
  • More precision would allow us to solve this in one dimension only. More precision could be achieved by splitting the header value into integer and fractional parts (Content-DPR: int=1, frac=234567), or into a rational (Content-DPR: a=1234567, b=1000000).
  • Specifying exact target intrinsic dimensions would allow us to solve it in both dimensions (for instance Content-DPR: w=871, h=576 or even Content-DPR: 1.234567;w=871;h=576;).

For this particular use case, exact dimensions would be best; failing that, more precision would be good; failing that, the current limitations... might be acceptable? Some things I'm noodling on:

  • Not sure if intrinsic dimensions are confusingly outside of the scope of the Content-DPR name, or still aligned with the other use cases, such that everything still fits under the same umbrella.
  • Not sure if this use case is important enough to merit it's own syntax or header.
  • Not sure if the existing behavior, with small layout jumps, is "good enough."
  • Pretty sure it would be harder to integrate exact intrinsic dimensions into HTML (this is not a dealbreaker, just work)

Define some terms

@malchata, in private conversation, mentioned that not understanding terms like "density-corrected intrinsic size" was a big blocker to understanding this stuff, when he was figuring it out. Maybe have a human-readable glossary, in addition to the links out to the spec text.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.