+Some cases skirt the line - for example, the 'cursor' property allows authors to specify a "hotspot", the actual location in the image where a "click" should originate from. This hotspot should be restricted to the bounds of the image. We can tell that a negative position is invalid at parse time, but the validity of a positive position can't be known until we download and parse the image. Theoretically, the author knows the bounds of their image, and so this should fall into the first category and become invalid, but we can't use the same type of invalidity (falling back to a previous declaration), because this happens long after the cascade has finished. Our choices are to either ignore the author's declaration (resetting the hotspot to its default position) or clamp it to the image's bounds. The latter respects the author's intent better, and is easy to do, so it should be chosen.
0 commit comments