34
35:- module(pldoc_style,
36 []). 37:- autoload(library(option),[merge_options/3]). 38
39:- multifile
40 theme/3,
41 html_text:style/3. 42
43html_text:style(Element, Condition, CSS) :-
44 style(Element, Condition, CSS0),
45 ( theme(Element, Condition, CSS1)
46 -> merge_options(CSS1, CSS0, CSS)
47 ; CSS = CSS0
48 ).
49
50style(div, class(synopsis),
51 [text_align(right), margin_bottom(2), margin_top(2)]).
52style(div, class(title),
53 [text_align(center), margin_bottom(3), margin_top(2), font_weight(bold)]).
54style(div, class('abstract-title'),
55 [margin_bottom(2), text_align(center), font_weight(bold)]).
56style(div, class(author),
57 [text_align(center), margin_bottom(3), margin_top(2)]).
58style(div, class(abstract),
59 [margin_bottom(3), margin_top(2)]).
60style(div, class('toc-h1'),
61 [margin_left(2)]).
62style(div, class('toc-h2'),
63 [margin_left(4)]).
64style(div, class('toc-h3'),
65 [margin_left(6), font_weight(normal)]). 66style(div, class('toc-h4'),
67 [margin_left(8), font_weight(normal)]).
68style(span, class('synopsis-hdr'),
69 [margin_right(1), font_weight(normal), color(green)]).
70style(span, class(autoload),
71 [margin_left(1), font_weight(normal), color(green)]).
72style(span, class('pred-tag'),
73 [float(right)]).
74style(var, true,
75 [color(red), font_weight(normal)]).
76style(code, true,
77 [color(blue)]).
78style(pre, true,
79 [color(blue)]).
80style(a, true,
81 [text_decoration(none), font_weight(bold)]).
82style(table, class(arglist),
83 [margin_left(4), margin_right(4)]).
84style(p, class(warning),
85 [text_align(center), color(red)]).
86style(span, class('help-query'),
87 [font_weight(bold)])