Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very cool!

Especially for the Sciter (and now Sciter.JS [1]) where we can use SVG paths directly in CSS as vector images:

    input.radio {
      background-image: url(path: M 4 8 L 10 1 L 13 0);
      background-size: 1em;
      stroke: black;
      stroke-width: 3px; 
    }
More details are here: https://sciter.com/lightweight-inline-vector-images-in-scite...

[1] Sciter.JS preview: https://github.com/c-smile/sciter-js-sdk



Seeing this reminds me of the question: "why do we have an <img> element? Why not an <icon> element? Or an <include> element?" [1] Back in the olden times shipping a feature like the `url(path:)` above was enough to have it become a defacto standard!

Meta: link [1] uses text-fragments [2] that seem super useful to me but apparently are not implemented by Firefox (yet!)

1: https://diveinto.html5doctor.com/past.html#:~:text=original%...

2: https://wicg.github.io/scroll-to-text-fragment/


Well, we have plenty of images already: <img>, <picture>, <figure>, <object>, <iframe> can be used for that purposes too. It is just unclear how <icon> is different from <img>.

As of <include> (so called client side includes) Sciter has them [1] as they make sense in precisely desktop environments - when files included from local sources (synchronously).

[1] <include> in Sciter: https://sciter.com/forums/topic/import-html-in-html/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: