On doc page OCaml library : Stdlib, v4.14
- When used in a normal doc entry, the interpreted result of
{!Ocaml_operators}
has a background color. - When used in a doc entry for deprecated operator (maybe also functions and types, not checked), there’s no background color.
Is this difference on purpose?
PS: It seems this difference came with the current html design, which is deployed since v4.12.
PS2: You won’t find docs for Stdlib.( & )
and Stdlib.( | )
in the latest codebase because they were already removed in preparation for release v5.0.0, see Remove deprecated functions by nojb · Pull Request #10867 · ocaml/ocaml · GitHub .
From browser’s “Inspect” utility, I find docs for normal operator are wrapped in a <p>
tag which then meet the background-color
css set for .api p code
. Docs for deprecated operators are not wrapped in a <p>
tag, hence the <code>
has no background color.
<div class="api">
<!-- doc for normal operator, for example Stdlib.(&&) -->
<div class="info ">
<div class="info-desc">
<p> [...], see <a href="Ocaml_operators.html">
<code class="code">
<span class="constructor">Ocaml_operators</span>
</code>
</a> for more information.</p>
</div>
</div>
<!-- doc for deprecated operator, for example Stdlib.(&) -->
<div class="info ">
<div class="info-deprecated">
[...], see <a href="Ocaml_operators.html">
<code class="code">
<span class="constructor">Ocaml_operators</span>
</code>
</a> for more information.
</div>
</div>
</div>
/* excerpted from styles.css */
.api p code, .api li code {
background-color: #ebf2f9;
}