]> gitweb.factorcode.org Git - factor.git/blob - basis/help/stylesheet/stylesheet.factor
Increased font size in help header path
[factor.git] / basis / help / stylesheet / stylesheet.factor
1 ! Copyright (C) 2005, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs colors colors.constants fry io.styles kernel
4 math namespaces sequences ;
5 IN: help.stylesheet
6
7 SYMBOL: default-span-style
8 H{
9     { font-name "sans-serif" }
10     { font-size 12 }
11     { font-style plain }
12 } default-span-style set-global
13
14 SYMBOL: default-block-style
15 H{
16     { wrap-margin 500 }
17 } default-block-style set-global
18
19 SYMBOL: link-style
20 H{
21     { foreground COLOR: DodgerBlue4 }
22     { font-style bold }
23 } link-style set-global
24
25 SYMBOL: emphasis-style
26 H{ { font-style italic } } emphasis-style set-global
27
28 SYMBOL: strong-style
29 H{ { font-style bold } } strong-style set-global
30
31 SYMBOL: title-style
32 H{
33     { font-name "sans-serif" }
34     { font-size 20 }
35     { font-style bold }
36     { wrap-margin 500 }
37     { foreground COLOR: gray20 }
38     { inset { 5 5 } }
39 } title-style set-global
40
41 SYMBOL: help-path-style
42 H{
43     { font-size 12 }
44     { table-gap { 5 5 } }
45     { table-border COLOR: FactorLightTan }
46 } help-path-style set-global
47
48 SYMBOL: heading-style
49 H{
50     { font-name "sans-serif" }
51     { font-size 16 }
52     { font-style bold }
53     { foreground COLOR: FactorDarkSlateBlue }
54 } heading-style set-global
55
56 SYMBOL: subsection-style
57 H{
58     { font-name "sans-serif" }
59     { font-size 14 }
60     { font-style bold }
61 } subsection-style set-global
62
63 SYMBOL: snippet-style
64 H{
65     { font-name "monospace" }
66     { font-size 12 }
67     { foreground COLOR: DarkOrange4 }
68 } snippet-style set-global
69
70 SYMBOL: code-char-style
71 H{
72     { font-name "monospace" }
73     { font-size 12 }
74 } code-char-style set-global
75
76 SYMBOL: code-style
77 H{
78     { page-color COLOR: FactorLightTan }
79     { inset { 5 5 } }
80     { wrap-margin f }
81 } code-style set-global
82
83 SYMBOL: output-style
84 H{
85     { font-style bold }
86     { foreground COLOR: DarkOrange4 }
87 } output-style set-global
88
89 SYMBOL: url-style
90 H{
91     { font-name "monospace" }
92     { foreground COLOR: DodgerBlue4 }
93 } url-style set-global
94
95 SYMBOL: warning-style
96 H{
97     { page-color COLOR: gray90 }
98     { border-color COLOR: red }
99     { inset { 5 5 } }
100     { wrap-margin 500 }
101 } warning-style set-global
102
103 SYMBOL: deprecated-style
104 H{
105     { page-color COLOR: gray90 }
106     { border-color COLOR: red }
107     { inset { 5 5 } }
108     { wrap-margin 500 }
109 } deprecated-style set-global
110
111 SYMBOL: table-content-style
112 H{
113     { wrap-margin 350 }
114 } table-content-style set-global
115
116 SYMBOL: table-style
117 H{
118     { table-gap { 5 5 } }
119     { table-border COLOR: FactorTan }
120 } table-style set-global
121
122 SYMBOL: list-style
123 H{ { table-gap { 10 2 } } } list-style set-global
124
125 SYMBOL: bullet
126 "• " bullet set-global
127
128 : adjust-help-font-size ( delta -- )
129     [
130         font-size
131         {
132             default-span-style title-style
133             help-path-style heading-style
134             subsection-style snippet-style
135             code-char-style
136         }
137     ] dip '[ get-global [ _ + ] change-at ] with each ;