跳到主要内容

HTML5响应式图像spat爆炸

+$Earlier This Week+$we reported on outlined proposals to deal with responsive images within web standards. Two options were provided:+$'srcset' was proposed by someone from Apple,和+$'picture' Polyfill+$was suggested as an alternative. The 'srcset' option has now made its way into the draft HTML5 spec, and developers are not happy.

Web开发人员蒂姆卡德莱克+$appeared Troubled在他的博客上+$by how the attribute made its way into the spec. He noted that a community group had been formed to discuss the issue, as suggested by the WHATWG, with+$the picture element gaining most support+$. Nonetheless, “[another] (partial) solution was proposed directly on the WHATWG list by an Apple employee [and while] the discussion was still taking place, and only five days after it was originally proposed, the srcset attribute (but not the picture element) was added to the draft”.

+$Kadlec said the developer community did exactly what was asked, following procedure, and yet the “method in which [the new attribute] was added reeks of valuing the opinion of implementors over developers”. Kadlec added that this latest event was+$reminiscent of what happened+$regarding the

+$Where the spec goes from here is anyone’s guess, but it’s clear the development community has been alienated by the WHATWG’s latest moves. On Twitter, developer+$Faruk Ate Reckoned+$the issue saw “the WHATWG completely violating its own policies of pragmatism and serving author needs above implementor needs”, while tech writerShelley Powers+$said the full story was not a pretty picture, adding: “[Ever] wonder why I'm snarky about HTML5?”

+$At the time of writing, Ian Hickson had not responded to .net’s request for comment, but his reasoning was outlined on an+$email to the WHATWG mailing list+$, arguing 'srcset' was simpler than the alternative, and that "the approach we have taken with HTML is to focus on what can be backwards-compatible-+$what can degrade in legacy UAs-+$while leaving the new features just for new browsers. Certainly, focusing on the short-term issue of what can be shimmed and what cannot is not optimising for the long term, which is the higher concern".

图片来源:+$CSSquirrel



翻译字数超限