]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Add a search field to the help dialog
[VimFx.git] / extension / skin / style.css
1 /*
2 * Copyright Simon Lydell 2015.
3 *
4 * This file is part of VimFx.
5 *
6 * VimFx is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * VimFx is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with VimFx. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 /* Allow file:/// prefix for testing using `gulp help.html`. */
21 @-moz-document url(chrome://browser/content/browser.xul), url-prefix(file:///)
22 {
23
24 /***** Button *****/
25
26 #VimFxButton {
27 list-style-image: url(icon16.png);
28 }
29
30 #main-window[vimfx-mode="ignore"] #VimFxButton {
31 list-style-image: url(icon16-red.png);
32 }
33
34 #VimFxButton[cui-areatype="menu-panel"],
35 toolbarpaletteitem[place="palette"] > #VimFxButton {
36 list-style-image: url(icon32.png);
37 }
38
39 #main-window[vimfx-mode="ignore"] #VimFxButton[cui-areatype="menu-panel"],
40 #main-window[vimfx-mode="ignore"] toolbarpaletteitem[place="palette"] > #VimFxButton {
41 list-style-image: url(icon32-red.png);
42 }
43
44 @media (min-resolution: 2dppx) {
45 #VimFxButton image {
46 width: 32px;
47 }
48
49 #VimFxButton {
50 list-style-image: url(icon32.png);
51 }
52
53 #main-window[vimfx-mode="ignore"] #VimFxButton {
54 list-style-image: url(icon32-red.png);
55 }
56
57 #VimFxButton[cui-areatype="menu-panel"],
58 toolbarpaletteitem[place="palette"] > #VimFxButton {
59 list-style-image: url(icon64.png);
60 }
61
62 #main-window[vimfx-mode="ignore"] #VimFxButton[cui-areatype="menu-panel"],
63 #main-window[vimfx-mode="ignore"] toolbarpaletteitem[place="palette"] > #VimFxButton {
64 list-style-image: url(icon64-red.png);
65 }
66 }
67
68 #main-window[vimfx-mode="normal"][vimfx-focus-type="editable"] #VimFxButton image {
69 filter: grayscale(100%) brightness(150%);
70 }
71
72
73
74 /* All styles below are intentionally very generic to fit with the user’s system
75 * and preferences. */
76
77
78
79 /***** Markers *****/
80
81 #VimFxMarkersContainer {
82 position: absolute;
83 }
84
85 /* Marker styles should be kept simple for performance. */
86 #VimFxMarkersContainer .marker {
87 position: absolute;
88 --padding: 0.2em;
89 padding: var(--padding);
90 --border-color: #ad810c;
91 --border-width: 1px;
92 border: solid var(--border-width) var(--border-color);
93 background-color: #ffd76e;
94 color: #302505;
95 font: menu;
96 line-height: 1;
97 font-weight: bold;
98 text-transform: uppercase;
99 white-space: nowrap;
100 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
101 * making them almost unreadable. */
102 text-shadow: none;
103 }
104
105 #VimFxMarkersContainer .marker-char {} /* Keep as documentation. */
106
107 #VimFxMarkersContainer .marker--matched,
108 #VimFxMarkersContainer .marker-char--matched {
109 color: #ffa22a;
110 }
111
112 #VimFxMarkersContainer .marker--hidden {
113 display: none;
114 }
115
116 /* alt, ctrl and meta can also be targeted. */
117 #main-window[vimfx-held-modifiers~="shift"] #VimFxMarkersContainer {
118 opacity: 0.2;
119 }
120
121 #VimFxMarkersContainer .marker[data-type="scrollable"] {
122 --width: 1px;
123 padding-right: calc(var(--padding) + var(--border-width) + var(--width));
124 }
125
126 #VimFxMarkersContainer .marker[data-type="scrollable"]::after {
127 content: '';
128 position: absolute;
129 top: 0;
130 right: 0;
131 height: 100%;
132 width: var(--width);
133 border-left: inherit;
134 background-image: linear-gradient(
135 to bottom,
136 transparent 15%,
137 var(--border-color) 0,
138 var(--border-color) 75%,
139 transparent 0
140 );
141 }
142
143
144
145 /***** Help Dialog *****/
146
147 #VimFxHelpDialogContainer {
148 position: absolute;
149 overflow-y: auto;
150 overflow-x: hidden;
151
152 opacity: 0.92;
153 background-color: Window;
154 color: WindowText;
155 font: menu;
156 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
157 * making them almost unreadable. */
158 text-shadow: none;
159
160 --page-padding: 3em;
161 --gutter: 1em;
162 padding-top: calc(var(--page-padding) / 2);
163 padding-left: calc(var(--page-padding) - var(--gutter));
164 padding-right: var(--page-padding);
165 }
166
167 #VimFxHelpDialogContainer .vimfx-box {
168 display: block;
169 }
170
171 #VimFxHelpDialogContainer :-moz-any(.heading-mode, .heading-category, .key-sequence) {
172 font-weight: bold;
173 white-space: nowrap;
174 }
175
176
177 #VimFxHelpDialogContainer .header {
178 position: relative;
179 margin-left: var(--gutter);
180 margin-bottom: calc(var(--page-padding) / 4);
181 font-weight: bold;
182 }
183
184 #VimFxHelpDialogContainer .heading-main {
185 font-size: 4.2em;
186 /* Add space for the close button. */
187 margin-right: 0.4em;
188 }
189
190 #VimFxHelpDialogContainer .logo {
191 display: inline;
192 margin-right: 0.5ch;
193 color: #349938;
194 font-style: italic;
195 letter-spacing: -0.06em;
196 text-shadow: 0.04em 0.02em black;
197 }
198
199 #VimFxHelpDialogContainer .logo::before {
200 content: 'ım';
201 margin-left: -0.15em;
202 padding-left: 1.34ch;
203 background: url(icon128.png) no-repeat;
204 background-size: contain;
205 }
206
207 #VimFxHelpDialogContainer .logo::after {
208 content: 'Fx';
209 color: #d37826;
210 }
211
212 #VimFxHelpDialogContainer .title {
213 display: inline-block;
214 font-size: 1.4ex;
215 line-height: 1.2;
216 }
217
218 #VimFxHelpDialogContainer .close-button {
219 position: absolute;
220 right: 0;
221 top: 0;
222 font-size: 3em;
223 -moz-user-select: none;
224 }
225
226 #VimFxHelpDialogContainer .close-button:hover {
227 cursor: pointer;
228 }
229
230 #VimFxHelpDialogContainer .content {
231 display: flex;
232 flex-wrap: wrap;
233 }
234
235 #VimFxHelpDialogContainer .category {
236 flex: 1 16em;
237 margin-left: var(--gutter);
238 margin-bottom: calc(var(--page-padding) / 2);
239 }
240
241 #VimFxHelpDialogContainer .heading-mode,
242 #VimFxHelpDialogContainer .category:not(.first)::before {
243 font-size: 2em;
244 }
245
246 #VimFxHelpDialogContainer .category:not(.first)::before {
247 /* Insert newline the same size as a `.heading-mode` to vertically align all
248 * `.heading-category`s. */
249 content: "\A";
250 white-space: pre;
251 }
252
253 #VimFxHelpDialogContainer .heading-category {
254 font-size: 1.5em;
255 }
256
257 #VimFxHelpDialogContainer .command {
258 float: left;
259 clear: left;
260 width: 100%;
261 margin-top: 0.2em;
262 }
263
264 #VimFxHelpDialogContainer .key-sequence {
265 float: left;
266 margin-right: 1.7ch;
267 }
268
269 #VimFxHelpDialogContainer .key-sequence:last-of-type {
270 margin-right: 0.7ch;
271 }
272
273 #VimFxHelpDialogContainer .key-sequence-special-keys {
274 /* The special keys are not helpful in the help dialog. If somebody
275 * disagrees, they can simply re-show them with custom CSS. */
276 display: none;
277 }
278
279 #VimFxHelpDialogContainer .key-sequence-rest {
280 display: inline;
281 }
282
283 #VimFxHelpDialogContainer .description {
284 float: right;
285 /* The space to the left should be wide enough to fit `<c-w>`. */
286 width: calc(100% - 3.5em);
287 }
288
289 #VimFxHelpDialogContainer .search-input {
290 position: fixed;
291 right: 0;
292 bottom: 0;
293 }
294
295 #VimFxHelpDialogContainer .search-match {} /* Keep as documentation. */
296
297 #VimFxHelpDialogContainer .search-non-match {
298 opacity: 0.2;
299 }
300
301 #VimFxHelpDialogContainer .search-highlight {
302 display: inline;
303 background-color: Highlight;
304 color: HighlightText;
305 }
306
307 }
Imprint / Impressum