llvm.org GIT mirror llvm / 2fd32b4
[OCaml] Use a nicer style for documentation than OCaml default. In particular, it's much easier to read, as it doesn't expand all the way on wide-screen displays. CSS committed under LLVM license with explicit permission from Daniel Bünzli <daniel.buenzli@erratique.ch>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242511 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Zotov 5 years ago
2 changed file(s) with 100 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
137137 COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
138138 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
139139 COMMAND ${OCAMLFIND} ocamldoc -d ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
140 -sort -colorize-code -html ${odoc_files})
140 -sort -colorize-code -html ${odoc_files}
141 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/_ocamldoc/style.css
142 ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html)
141143
142144 add_dependencies(ocaml_doc ${doc_targets})
143145
0 /* A style for ocamldoc. Daniel C. Buenzli */
1
2 /* Reset a few things. */
3 html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
4 a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
5 small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,
6 form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
7 { margin: 0; padding: 0; border: 0 none; outline: 0; font-size: 100%;
8 font-weight: inherit; font-style:inherit; font-family:inherit;
9 line-height: inherit; vertical-align: baseline; text-align:inherit;
10 color:inherit; background: transparent; }
11
12 table { border-collapse: collapse; border-spacing: 0; }
13
14 /* Basic page layout */
15
16 body { font: normal 10pt/1.375em helvetica, arial, sans-serif; text-align:left;
17 margin: 1.375em 10%; min-width: 40ex; max-width: 72ex;
18 color: black; background: transparent /* url(line-height-22.gif) */; }
19
20 b { font-weight: bold }
21 em { font-style: italic }
22
23 tt, code, pre { font-family: WorkAroundWebKitAndMozilla, monospace;
24 font-size: 1em; }
25 pre code { font-size : inherit; }
26 .codepre { margin-bottom:1.375em /* after code example we introduce space. */ }
27
28 .superscript,.subscript
29 { font-size : 0.813em; line-height:0; margin-left:0.4ex;}
30 .superscript { vertical-align: super; }
31 .subscript { vertical-align: sub; }
32
33 /* ocamldoc markup workaround hacks */
34
35
36
37 hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br
38 { display: none } /* annoying */
39
40 div.info + br { display:block}
41
42 .codepre br + br { display: none }
43 h1 + pre { margin-bottom:1.375em} /* Toplevel module description */
44
45 /* Sections and document divisions */
46
47 /* .navbar { margin-bottom: -1.375em } */
48 h1 { font-weight: bold; font-size: 1.5em; /* margin-top:1.833em; */
49 margin-top:0.917em; padding-top:0.875em;
50 border-top-style:solid; border-width:1px; border-color:#AAA; }
51 h2 { font-weight: bold; font-size: 1.313em; margin-top: 1.048em }
52 h3 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
53 h3 { font-weight: bold; font-size: 1em; margin-top: 1.375em}
54 h4 { font-style: italic; }
55
56 /* Used by OCaml's own library documentation. */
57 h6 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
58 .h7 { font-weight: bold; font-size: 1em; margin-top: 1.375em }
59
60 p { margin-top: 1.375em }
61 pre { margin-top: 1.375em }
62 .info { margin: 0.458em 0em -0.458em 2em;}/* Description of types values etc. */
63 td .info { margin:0; padding:0; margin-left: 2em;} /* Description in indexes */
64
65 ul, ol { margin-top:0.688em; padding-bottom:0.687em;
66 list-style-position:outside}
67 ul + p, ol + p { margin-top: 0em }
68 ul { list-style-type: square }
69
70
71 /* h2 + ul, h3 + ul, p + ul { } */
72 ul > li { margin-left: 1.375em; }
73 ol > li { margin-left: 1.7em; }
74 /* Links */
75
76 a, a:link, a:visited, a:active, a:hover { color : #00B; text-decoration: none }
77 a:hover { text-decoration : underline }
78 *:target {background-color: #FFFF99;} /* anchor highlight */
79
80 /* Code */
81
82 .keyword { font-weight: bold; }
83 .comment { color : red }
84 .constructor { color : green }
85 .string { color : brown }
86 .warning { color : red ; font-weight : bold }
87
88 /* Functors */
89
90 .paramstable { border-style : hidden ; padding-bottom:1.375em}
91 .paramstable code { margin-left: 1ex; margin-right: 1ex }
92 .sig_block {margin-left: 1em}
93
94 /* Images */
95
96 img { margin-top: 1.375em }