4 ms·
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-i
by c-smile 6y ago
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-sciter/ https://sciter.com/lightweight-inline-vector-images-in-scite...
[1] Sciter.JS preview: https://github.com/c-smile/sciter-js-sdk https://github.com/c-smile/sciter-js-sdk
- emmanueloga_ 6y agoSeeing 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%20question:%20why%20do%20we%20have%20an%20%3Cimg%3E%20element https://diveinto.html5doctor.com/past.html#:~:text=original%... 2: https://wicg.github.io/scroll-to-text-fragment/ https://wicg.github.io/scroll-to-text-fragment/
- c-smile 6y agoWell, 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/ https://sciter.com/forums/topic/import-html-in-html/