aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.css
Commit message (Collapse)AuthorAgeFilesLines
* Remove more redundant element selectors where the class selectorIngo Schwarze2018-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;Ingo Schwarze2018-07-231-6/+6
| | | | recommended by John Gardner <gardnerjohng at gmail dot com>
* For -man -Thtml, ignore author-specified .HP widths because theyIngo Schwarze2018-06-251-1/+6
| | | | harm responsive design; use @media-dependent defaults instead.
* In HTML output, for lists that have an -indent argument, just useIngo Schwarze2018-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 useIngo Schwarze2018-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:Ingo 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.Ingo 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.Ingo Schwarze2018-05-211-2/+3
|
* Use <span> for .Ad rather than <i>; also suggested by John Gardner.Ingo Schwarze2018-05-211-2/+3
|
* Use <span> rather than abusing <i> for .Pa;Ingo Schwarze2018-05-211-2/+3
| | | | suggested by John Gardner <gardnerjohng at gmail dot com>.
* Fix a long-standing issue:Ingo 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.Ingo 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 fixedIngo Schwarze2018-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"Ingo 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,Ingo Schwarze2017-07-161-3/+4
| | | | | | so the only elements 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 -tagIngo Schwarze2017-07-151-2/+2
|
* correct left margins for different classes of definition listsIngo Schwarze2017-07-151-6/+6
|
* Handle .Bl -compact via CSS rather than writing individual styleIngo Schwarze2017-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 outputIngo Schwarze2017-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">.Ingo 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>;Ingo Schwarze2017-02-051-6/+11
| | | | suggested by bentley@ long ago, but needed lots of cleanup first
* for .Rs, use <cite>Ingo Schwarze2017-02-051-2/+3
|
* Improve HTML formatting of .Bl -tag.Ingo Schwarze2017-01-251-4/+13
| | | | | | | | | | | | | | | | | | | | | In particular, when using the style sheet, put the body on the same line as the head for short heads, or on the next line for long heads, in a way that preserves both correct indentation and correct vertical spacing with and without -compact, and with one or more heads per body (hi, Zaphod) - eight use cases so far - and with and without -tag, and with and without -offset, 32 use cases grand total. Using many ideas from zhuk@, from <David dot Dahlberg at fkie dot fraunhofer dot de>, and from Benny Lofgren <bl dash lists at lofgren dot biz>, and a few of my own. This is an excellent demonstration that CSS is an extremely hostile language, much more trapful and much harder to use than, say, C. When matthew@ reported this in July 2014 (!), it was already a known issue, and i no longer remember for how long. My first serious attempt at fixing it (in November 2015) failed miserably. I'd love to see simplifications of both the generated HTML code and of the style sheet, but without breaking any of the 32 use cases, please.
* slightly simplify header and footer stylesIngo Schwarze2017-01-211-8/+7
|
* Avoid writing constant style attributes over and over again.Ingo Schwarze2017-01-211-4/+7
| | | | Move them to the style sheet.
* clean up the remaining class attributesIngo Schwarze2017-01-211-27/+14
|
* Standardize class attributes for semantic macros.Ingo Schwarze2017-01-201-26/+42
| | | | Correct markup for .Va and iprove markup for .Dv, .Er, .Ev while here.
* standardize .Rs class attributesIngo Schwarze2017-01-201-16/+17
|
* standardize .Bl and .It class attributesIngo Schwarze2017-01-201-47/+36
|
* clean up markup of .Bd, .D1, .Dl, .Li, and .Ql;Ingo Schwarze2017-01-191-4/+12
| | | | in particular, stop abuse of <blockquote>
* clean up .Sx and .Xr HTML markupIngo Schwarze2017-01-191-4/+3
|
* Clean up CSS rules for sections and paragraphs.Ingo Schwarze2017-01-191-8/+14
| | | | Start using real macro names for CSS classes.
* Clean up and fix rules for header and footer lines.Ingo Schwarze2017-01-191-13/+22
| | | | In particular, horizontal alignment was missing.
* Start cleanup: trim useless HTML comments, <div> elements,Ingo Schwarze2017-01-191-23/+20
| | | | and CSS rules on the <html> and <body> levels.
* fix error page indentation:Ingo Schwarze2016-04-131-2/+3
| | | | | negative indent for h1 only in div.section issue reported by mikeb@
* Unify the three stylesheets into a single CSS file.Ingo Schwarze2015-11-051-0/+158
Many thanks to bentley@ for doing this work.