Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document approach to styling #308

Open
lognaturel opened this issue Mar 15, 2024 · 1 comment
Open

Document approach to styling #308

lognaturel opened this issue Mar 15, 2024 · 1 comment

Comments

@lognaturel
Copy link
Member

lognaturel commented Mar 15, 2024

  • Body can't contain arbitrary markup as in W3C XForms
  • Certain body elements can contain markup (e.g. labels)
  • Markdown and a subset of HTML are supported

Reference implementation: https://github.com/getodk/collect/blob/master/collect_app/src/main/java/org/odk/collect/android/utilities/HtmlUtils.java#L23

Clients should either render the styling or strip it out.

@eyelidlessness
Copy link
Member

To capture/distill some of my thinking from the Slack discussion:

  • This feels like it belongs in the spec, even if optional, at least to specify the opt-out behavior. Current examples of opt-out behavior are not ideal: producing the Markdown, including the HTML subset, as-is (e.g. **bold** _italics_ <br> -> **bold** _italics_ &lt;br&gt;). Removing formatting would be preferable if/when Markdown is unsupported.
  • Inclusion in the spec doesn't have to/shouldn't mean writing yet another Markdown standard; ideally we can map the current reference implementation's behavior to pertinent aspects of CommonMark (which is a rare counterexample of the aforementioned yet-another-spec problem).
  • Having an explicit derived spec subset, our implementations can hopefully defer to/become oriented around existing CommonMark implementations. Collect could still be treated as the reference implementation, but as a reference implementation it might look more like configuration to achieve the Markdown/HTML subset we specify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants