weixin_39525313 2020-11-30 12:11
浏览 0

CSS selector case insensitivity in HTML not honoured

Element name CSS selectors in HTML are case insensitive, i.e. SPaN matches <span>. This behaviour is currently not guaranteed by rasterizeHTML.js as the input is transformed to XHTML where selectors are case sensitive.

Additionally it should be checked whether the same applies to the :hover and :active selector rewrites.

该提问来源于开源项目:cburgmer/rasterizeHTML.js

  • 写回答

6条回答 默认 最新

  • weixin_39525313 2020-11-30 12:11
    关注

    There doesn't seem to be a clean way of knowing whether a CSS tag name selector references an HTML tag or one of another namespace (e.g. svg).

    Idee: Scan the element tree for HTML and non-HTML tags. Then in unambiguous cases (e.g. td only found in HTML NS parts of the DOM) convert matching HTML tag name selectors to lowercase.

    评论

报告相同问题?