summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mandoc.css (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Support prefers-color-scheme: dark.schwarze2019-06-021-8/+21
| | | | | The :visited rule was contributed by <Armin at Besirovic dot com>. Guidance and OK tj@.
* Wrap .Sh/.SH sections and .Ss/.SS subsections in HTML <section> elementsschwarze2019-03-011-9/+11
| | | | | | as recommended for accessibility by the HTML 5 standard. Triggered by a similar, but slightly different suggestion from Laura Morales <lauretas at mail dot com>.
* Remove the HTML title= attributes which harmed accessibility andschwarze2019-01-111-2/+76
| | | | | | | violated the principle of separation of content and presentation. Instead, implement the tooltips purely in CSS. Thanks to John Gardner <gardnerjohng at gmail dot com> for suggesting most of the styling in the new ::before rules.
* After years of gnashing of teeth, i finally found a way to avoidschwarze2019-01-101-2/+7
| | | | | | | | | | | | | | | | | | having to write empty list elements for non-compact .Bl -tag lists: 1. Add margin-bottom to the <dd>. Note that margin-top on the <dt> doesn't work because it would put a short <dt> lower than the <dd>; margin-bottom on the <dt> doesn't work because it would put vertical space before the <dd> for a long <dt>; and margin-top on the <dd> doesn't work because it would put a short <dt> higher than the <dd>. Only margin-bottom on the <dd> has none of these adverse effects. 2. Of course, margin-bottom on the <dd> fails to take care of the vertical spacing before the first list element, so implement that separately by margin-top on the <dl>. 3. For .Bl -tag -compact, reset both to zero.
* Restrict "vertical-align: middle;" to <td> descendants of class="tbl"schwarze2018-12-041-3/+3
| | | | elements, we don't want that for other tables.
* Make sure all borders in a table are drawn in the same color.schwarze2018-12-041-2/+7
| | | | | | | Required because browsers tend to have inconsistent defaults: For example, Firefox 62.0.2 sets border-color for tbody, but not for table, and Pali Rohar reports that Chrome set it for td, but not for tr or tbody. The td part is from Pali Rohar, the tbody and tr parts from me.
* Implement tbl(7) lines in -T html output,schwarze2018-11-261-3/+6
| | | | | | | | | | | | as far as they are on the edges of table cells rather than going through the middle of cells: * the box, doublebox, and allbox options; * the | and || layout modifiers; * and the _ and = data lines; - but not yet _ and = in individual layout and data cells. Missing feature reported by Pali dot Rohar at gmail dot com.
* Place mandoc.css into the public domain.schwarze2018-11-261-1/+6
| | | | | | | | | | | | | | | | The reason for doing this rather than using the ISC license is that i guess that in some contexts, a requirement to preserve a Copyright and license header might be inconvenient, and i really don't care at all how people use it. What matters is that they do use it, or something similar - attempts to use mandoc without any CSS are a constant source of grief and bogus bug reports because HTML without CSS doesn't look very good: the more structural and semantic and the less presentational and old-fashioned the HTML, the more so. Thanks to Mark Harris <mark dot hsj at gmail dot com> for pointing out that the permissions on this particular file were unclear.
* Implement horizontal and vertical alignment of tbl(7) cell contentschwarze2018-11-241-2/+2
| | | | | in -T html output. This does not handle spanned cells yet. Missing feature reported by Pali dot Rohar at gmail dot com.
* Reduce excessive right padding in tagged list heads.schwarze2018-08-271-2/+2
| | | | | | The 1.2em was an approximate equivalent of the 2n traditionally used for terminal display, but it is much too wide for HTML rendering. Issue reported by mikeb@.
* Remove more redundant element selectors where the class selectorschwarze2018-07-231-37/+37
| | | | | is already sufficient. John Gardner tells me that "CSS selectors should only contain what's necessary to target their subjects".
* replace the last instances of ex units by em;schwarze2018-07-231-6/+6
| | | | recommended by John Gardner <gardnerjohng at gmail dot com>
* For -man -Thtml, ignore author-specified .HP widths because theyschwarze2018-06-251-1/+6
| | | | harm responsive design; use @media-dependent defaults instead.
* In HTML output, for lists that have an -indent argument, just useschwarze2018-06-101-3/+3
| | | | | | | | | | | | | a uniform indentation in CSS adapted to the viewport width and ignore the value of the argument taken from mdoc(7). While author-specified widths somewhat work as a micro-optimization in terminal and typeset output, they are nothing but harmful in HTML style= attributes because they break responsive design, whereas using a reasonable default indent almost never results in ugly output. Admittedly, the author-specified width might occasionally look even better, but only slightly so, and only for some viewport sizes. Based on guidance provided by John Gardner.
* John Gardner tells me that among frontend developers, gratuitous useschwarze2018-05-281-53/+56
| | | | | | | | | | of double selectors like "element.class" is considered poor style. When doing selection mainly by elements is not appropriate because most elements require several different styles, exclusively selecting by class is less cumbersome, more concise, and more flexible. So drop the elements from the selectors, except where they are required for disambiguation and except where they add clarity due to the presence of child selectors.
* Start with baby steps towards responsive design:schwarze2018-05-261-1/+15
| | | | | Use a @media width query to select a set of default indentations. Suggested by John Gardner <gardnerjohng at gmail dot com>.
* Use em units rather than ex units for horizontal lengths.schwarze2018-05-261-20/+20
| | | | | | John Gardner and others tell me it produces more predictable results and is generally considered better style. Also use 0em instead of 0ex, in general.
* Use <span> for .Ms rather than <b>; discussed with John Gardner.schwarze2018-05-211-2/+3
|
* Use <span> for .Ad rather than <i>; also suggested by John Gardner.schwarze2018-05-211-2/+3
|
* Use <span> rather than abusing <i> for .Pa;schwarze2018-05-201-2/+3
| | | | suggested by John Gardner <gardnerjohng at gmail dot com>.
* Fix a long-standing issue:schwarze2018-05-091-3/+4
| | | | | | | | | Some macros (Nd, Oo) can contain blocks but rendered as elements that can only contain phrasing content, resulting in invalid HTML nesting. Switch them to <div>. Also move the related "display: inline" style from the HTML to the CSS. Reminded during a conversation with John Gardner.
* Eliminate the class=It-* attributes.schwarze2018-05-081-18/+26
| | | | | Cleaner HTML, more idiomatic CSS, and minus 30 lines of C code. Suggested by John Gardner <gardnerjohng at gmail dot com>.
* Switch the emitted HTML element from <b> to <code> for the fixedschwarze2018-05-081-9/+25
| | | | | | | | syntax element macros .Nm, .Fl, .Cm, .Ic, .In, .Fd, .Fn, and .Cd. Adjust both the internal and external style sheets such that rendering remains unchanged in typical browsers. Based on feedback from John Gardner <gardnerjohng at gmail dot com>.
* replace my vague and idiosyncratic term "selflink"schwarze2018-04-241-2/+2
| | | | | with the clearer and more usual "permalink"; suggested by John Gardner <gardnerjohng at gmail dot com>
* The only elements using floats are dt.It-tag, so the only elementsschwarze2017-07-161-3/+4
| | | | | | allowed to the right of them are dd.It-tag. Fixes overlapping rendering after long tag lists without bodies, for example in the Xenocara apm(4) manual. Issue reported by tj@.
* use the same width increase logic for .Bl -hang as for .Bl -tagschwarze2017-07-151-2/+2
|
* correct left margins for different classes of definition listsschwarze2017-07-151-6/+6
|
* Handle .Bl -compact via CSS rather than writing individual styleschwarze2017-07-141-1/+9
| | | | | | | | attributes into .It blocks; suggested by Steffen Nurpmeso <steffen at sdaoden dot eu> on <groff at GNU dot org> in April 2017. Delete margin-bottom and margin-top style names and the 'v' argument letter from print_otag() because they are no longer used.
* Port ctags-style, less(1) :t internal searching from terminal outputschwarze2017-03-131-1/+6
| | | | | | | | | | to HTML output. For certain macros appearing at the beginning of .It heads, write HTML id="..." attributes such that deep linking works. Write HTML <a> attributes such that you can easily copy out link targets with the mouse. Try: http://man.openbsd.org/vmctl.8#create Feature suggested by <guettliml at Thomas dash Guettler dot de>, some details of the design and implementation by me.
* Wrap .St content in a <span class="St">.schwarze2017-02-051-1/+2
| | | | Also add forgotten <span class="Ux"> to .At rendering.
* mark up .Ar, .Fa, .Va, .Ft, and .Vt with <var> rather than <i>;schwarze2017-02-051-6/+11
| | | | suggested by bentley@ long ago, but needed lots of cleanup first
* for .Rs, use <cite>schwarze2017-02-051-2/+3
|
* Add the style sheet used on man.openbsd.org to the source tree.schwarze2017-01-251-0/+182
It is NOT used during "make build" and NOT installed, but it is helpful for people trying to read and understand html.c and mdoc_html.c, and maybe even for users of mandoc -Thtml. OK deraadt@