]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Use normal cursor in 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 cursor: default;
160
161 --page-padding: 3em;
162 --gutter: 1em;
163 padding-top: calc(var(--page-padding) / 2);
164 padding-left: calc(var(--page-padding) - var(--gutter));
165 padding-right: var(--page-padding);
166 }
167
168 #VimFxHelpDialogContainer .vimfx-box {
169 display: block;
170 }
171
172 #VimFxHelpDialogContainer :-moz-any(.heading-mode, .heading-category, .key-sequence) {
173 font-weight: bold;
174 white-space: nowrap;
175 }
176
177
178 #VimFxHelpDialogContainer .header {
179 position: relative;
180 margin-left: var(--gutter);
181 margin-bottom: calc(var(--page-padding) / 4);
182 font-weight: bold;
183 }
184
185 #VimFxHelpDialogContainer .heading-main {
186 font-size: 4.2em;
187 /* Add space for the close button. */
188 margin-right: 0.4em;
189 }
190
191 #VimFxHelpDialogContainer .logo {
192 display: inline;
193 margin-right: 0.5ch;
194 color: #349938;
195 font-style: italic;
196 letter-spacing: -0.06em;
197 text-shadow: 0.04em 0.02em black;
198 }
199
200 #VimFxHelpDialogContainer .logo::before {
201 content: 'ım';
202 margin-left: -0.15em;
203 padding-left: 1.34ch;
204 background: url(icon128.png) no-repeat;
205 background-size: contain;
206 }
207
208 #VimFxHelpDialogContainer .logo::after {
209 content: 'Fx';
210 color: #d37826;
211 }
212
213 #VimFxHelpDialogContainer .title {
214 display: inline-block;
215 font-size: 1.4ex;
216 line-height: 1.2;
217 }
218
219 #VimFxHelpDialogContainer .close-button {
220 position: absolute;
221 right: 0;
222 top: 0;
223 font-size: 3em;
224 -moz-user-select: none;
225 }
226
227 #VimFxHelpDialogContainer .close-button:hover {
228 cursor: pointer;
229 }
230
231 #VimFxHelpDialogContainer .content {
232 display: flex;
233 flex-wrap: wrap;
234 }
235
236 #VimFxHelpDialogContainer .category {
237 flex: 1 16em;
238 margin-left: var(--gutter);
239 margin-bottom: calc(var(--page-padding) / 2);
240 }
241
242 #VimFxHelpDialogContainer .heading-mode,
243 #VimFxHelpDialogContainer .category:not(.first)::before {
244 font-size: 2em;
245 }
246
247 #VimFxHelpDialogContainer .category:not(.first)::before {
248 /* Insert newline the same size as a `.heading-mode` to vertically align all
249 * `.heading-category`s. */
250 content: "\A";
251 white-space: pre;
252 }
253
254 #VimFxHelpDialogContainer .heading-category {
255 font-size: 1.5em;
256 }
257
258 #VimFxHelpDialogContainer .command {
259 float: left;
260 clear: left;
261 width: 100%;
262 margin-top: 0.2em;
263 }
264
265 #VimFxHelpDialogContainer .key-sequence {
266 float: left;
267 margin-right: 1.7ch;
268 }
269
270 #VimFxHelpDialogContainer .key-sequence:last-of-type {
271 margin-right: 0.7ch;
272 }
273
274 #VimFxHelpDialogContainer .key-sequence-special-keys {
275 /* The special keys are not helpful in the help dialog. If somebody
276 * disagrees, they can simply re-show them with custom CSS. */
277 display: none;
278 }
279
280 #VimFxHelpDialogContainer .key-sequence-rest {
281 display: inline;
282 }
283
284 #VimFxHelpDialogContainer .description {
285 float: right;
286 /* The space to the left should be wide enough to fit `<c-w>`. */
287 width: calc(100% - 3.5em);
288 }
289
290 #VimFxHelpDialogContainer .search-input {
291 position: fixed;
292 right: 0;
293 bottom: 0;
294 }
295
296 #VimFxHelpDialogContainer .search-match {} /* Keep as documentation. */
297
298 #VimFxHelpDialogContainer .search-non-match {
299 opacity: 0.2;
300 }
301
302 #VimFxHelpDialogContainer .search-highlight {
303 display: inline;
304 background-color: Highlight;
305 color: HighlightText;
306 }
307
308 }
Imprint / Impressum