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