# gmi-web ## HTML Due to the ambiguity of HTML several translations from Gemini exist in the wild. I propose the following standard: ``` UL ↔ * BLOCKQUOTE ↔ > PRE ↔ ``` A ↔ => H[1-3] ↔ #[##] P ``` > Empty lines should simply be represented as
tag and never a
tags as that is how "enter" is handled when contenteditable=true. It is uncertain why the browser behaves so but they can be safely translated to \n. and you need not translate \n →
as that's implied in "preformatted". * accessibility * pre alt text * inline media ## CSS Following this standard will allow gmi.css to render your content reliably and readably across many devices. => /css/ read more about gmi.css ## JavaScript This also paves the way for setting contenteditable on the root element and enabling the browsers native HTML document editor. Unfortunately it does not handle a few annoying quirks which may only be addressed with custom JavaScript. gmi.js is currently under active development but already exposes a Gemini.line function which wraps the DOM API following the above standard. This should enable addressing the editability quirks and also provide a foundation for future JS/Gemini mashups. => /js/ read more about gmi.js => https://git.sr.ht/~talon/gmi-web/ gmi-web is licensed under CC0 and available on sourcehut