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
improve produced html so we can build better stylesheets #5544
Comments
Comment author: @protz That's pretty cool. However, the formatting seems to be off at least on http://vfiack.fr/ocaml/doc/Gc.html. Is that intentional? |
Comment author: @dbuenzli Yes. It would be nice if all the br and hr could be removed and the markup generation could be reviewed for better semantic markup, adding approriate class names where needed. For the record here are the various hacks I have to use with the current markup in my stylesheet : hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br code br { display: inline } /* because of the above span + br rule / Also generating valid html could also make the task easier for consistency across different browsers see PR #5111. |
Comment author: vfiack The formatting in Gc wasn't intentional, I forgot to close a pre tag for record types. This is fixed. |
Comment author: @gasche I don't like the fact that code examples that are part of the comments have a red background like signature items. See for example (let f () = "foo") in http://vfiack.fr/ocaml/doc/String.html It seems the generated HTML makes it impossible to do the difference. Maybe you could tweak it again to get different classes for those? PS: there are two ways to put code in ocamldoc's formatted comment, preformatted {[ foo ]} and verbatim {v foo v}. Both should be handled, possibly with even finer class distinctions to be able to distinguish them, but I'm not sure that's terribly important. |
Comment author: vfiack added a "codepre" and "verbatim" classes + the css to reset the background & border. new patch is here : http://vfiack.fr/ocaml/odoc_html.ml.diff |
Comment author: meyer +1 I like the proposed doc style quite much - it's pleasant and readable. Did anybody try it on a different browsers than Firefox? |
Comment author: vfiack I've tested it on chrome, IE 8, and an android phone browser. The first column of the module index table wasn't grey in IE (:first-child isn't supported). I've changed the generator to add a css class to fix this. Everything else seems ok. The patch is up to date. |
Comment author: @zoggy Partially applied patch in revision 12434. What was not applied: some of the style to keep original display, except for table of modules. |
Original bug ID: 5544
Reporter: vfiack
Assigned to: @zoggy
Status: closed (set by @zoggy on 2012-05-07T09:43:42Z)
Resolution: fixed
Priority: normal
Severity: trivial
Category: ocamldoc
Monitored by: meyer @hcarty @dbuenzli
Bug description
Summary of the patch:
tags
Additional information
sample result: http://vfiack.fr/ocaml/doc/
File attachments
The text was updated successfully, but these errors were encountered: