1 ! Copyright (C) 2005, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs colors.constants fonts fry io.styles kernel
4 literals math math.order namespaces sequences ui.theme ;
7 : wrap-margin-full ( -- n )
8 48 default-font-size * ;
10 : wrap-margin-table-content ( -- n )
11 32 default-font-size * ;
13 : wrap-margin-list-content ( -- n )
14 40 default-font-size * ;
16 : font-size-subsection ( -- n )
17 14/12 default-font-size * >integer ;
19 : font-size-title ( -- n )
20 20/12 default-font-size * >integer ;
22 : font-size-heading ( -- n )
23 16/12 default-font-size * >integer ;
25 : font-size-span ( -- n )
26 14/12 default-font-size * >integer ;
30 { font-name $ default-sans-serif-font-name }
31 { font-size $ font-size-span }
32 { foreground $ text-color }
34 { wrap-margin $ wrap-margin-full }
35 } default-style set-global
39 { foreground $ link-color }
41 } link-style set-global
43 SYMBOL: emphasis-style
44 H{ { font-style italic } } emphasis-style set-global
47 H{ { font-style bold } } strong-style set-global
51 { font-name $ default-sans-serif-font-name }
52 { font-size $ font-size-title }
54 { wrap-margin $ wrap-margin-full }
55 { foreground $ title-color }
56 { page-color COLOR: FactorLightTan }
58 } title-style set-global
60 SYMBOL: help-path-style
62 { font-name $ default-sans-serif-font-name }
63 { font-size $ font-size-span }
65 { foreground $ text-color }
67 } help-path-style set-global
71 { font-name $ default-sans-serif-font-name }
72 { font-size $ font-size-heading }
74 { foreground $ heading-color }
75 } heading-style set-global
77 SYMBOL: subsection-style
79 { font-name $ default-sans-serif-font-name }
80 { font-size $ font-size-subsection }
82 } subsection-style set-global
86 { font-name $ default-monospace-font-name }
87 { font-size $ default-font-size }
88 { foreground $ snippet-color }
89 } snippet-style set-global
93 { font-name $ default-monospace-font-name }
94 { font-size $ default-font-size }
95 { page-color $ code-background-color }
98 } code-style set-global
103 { foreground $ output-color }
104 } output-style set-global
108 { font-name $ default-monospace-font-name }
109 { foreground $ link-color }
110 } url-style set-global
112 SYMBOL: warning-style
114 { page-color $ warning-background-color }
115 { border-color $ warning-border-color }
117 { wrap-margin $ wrap-margin-full }
118 } warning-style set-global
120 SYMBOL: deprecated-style
122 { page-color $ warning-background-color }
123 { border-color $ warning-border-color }
125 { wrap-margin $ wrap-margin-full }
126 } deprecated-style set-global
128 SYMBOL: table-content-style
130 { wrap-margin $ wrap-margin-table-content }
131 } table-content-style set-global
135 { table-gap { 5 5 } }
136 { table-border $ table-border-color }
137 } table-style set-global
139 SYMBOL: list-content-style
141 { wrap-margin $ wrap-margin-list-content }
142 } list-content-style set-global
146 { table-gap { 5 5 } }
147 } list-style set-global
150 "• " bullet set-global
152 : adjust-help-font-size ( delta -- )
156 default-style title-style
157 help-path-style heading-style
158 subsection-style snippet-style
161 ] dip '[ get-global [ _ + 1 max ] change-at ] with each ;