]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Merge branch 'master' into develop
[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: 16px;
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 #VimFxMarkersContainer.ui {
86 position: fixed;
87 top: 0;
88 left: 0;
89 width: 100%;
90 height: 100%;
91 z-index: 9999;
92 }
93
94 /* Marker styles should be kept simple for performance. */
95 #VimFxMarkersContainer .marker {
96 position: absolute;
97 --padding: 0.2em;
98 padding: var(--padding);
99 --border-color: #ad810c;
100 --border-width: 1px;
101 border: solid var(--border-width) var(--border-color);
102 background-color: #ffd76e;
103 color: #302505;
104 font: menu;
105 line-height: 1;
106 font-weight: bold;
107 text-transform: uppercase;
108 white-space: nowrap;
109 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
110 * making them almost unreadable. */
111 text-shadow: none;
112 }
113
114 #VimFxMarkersContainer .marker-char {} /* Keep as documentation. */
115
116 #VimFxMarkersContainer .marker--matched,
117 #VimFxMarkersContainer .marker-char--matched {
118 color: #ffa22a;
119 }
120
121 #VimFxMarkersContainer .marker--hidden {
122 display: none;
123 }
124
125 /* alt, ctrl and meta can also be targeted. */
126 #main-window[vimfx-held-modifiers~="shift"] #VimFxMarkersContainer {
127 opacity: 0.2;
128 }
129
130 #VimFxMarkersContainer .marker[data-type="scrollable"] {
131 --width: 1px;
132 padding-right: calc(var(--padding) + var(--border-width) + var(--width));
133 }
134
135 #VimFxMarkersContainer .marker[data-type="scrollable"]::after {
136 content: '';
137 position: absolute;
138 top: 0;
139 right: 0;
140 height: 100%;
141 width: var(--width);
142 border-left: inherit;
143 background-image: linear-gradient(
144 to bottom,
145 transparent 15%,
146 var(--border-color) 0,
147 var(--border-color) 75%,
148 transparent 0
149 );
150 }
151
152
153
154 /***** Help Dialog *****/
155
156 #VimFxHelpDialogContainer {
157 position: absolute;
158
159 opacity: 0.92;
160 background-color: Window;
161 color: WindowText;
162 font: menu;
163 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
164 * making them almost unreadable. */
165 text-shadow: none;
166 cursor: default;
167
168 --page-padding: 3em;
169 --gutter: 1em;
170 }
171
172 #VimFxHelpDialogContainer .wrapper {
173 position: absolute;
174 top: 0;
175 bottom: 0;
176 left: 0;
177 right: 0;
178 overflow-y: auto;
179 overflow-x: hidden;
180 padding-top: calc(var(--page-padding) / 2);
181 padding-left: calc(var(--page-padding) - var(--gutter));
182 padding-right: var(--page-padding);
183 }
184
185 #VimFxHelpDialogContainer .vimfx-box {
186 display: block;
187 }
188
189 #VimFxHelpDialogContainer :-moz-any(.heading-mode, .heading-category, .key-sequence) {
190 font-weight: bold;
191 white-space: nowrap;
192 }
193
194
195 #VimFxHelpDialogContainer .header {
196 position: relative;
197 margin-left: var(--gutter);
198 margin-bottom: calc(var(--page-padding) / 4);
199 font-weight: bold;
200 }
201
202 #VimFxHelpDialogContainer .heading-main {
203 font-size: 4.2em;
204 /* Add space for the close button. */
205 margin-right: 0.4em;
206 }
207
208 #VimFxHelpDialogContainer .logo {
209 display: inline;
210 margin-right: 0.5ch;
211 color: #349938;
212 font-style: italic;
213 letter-spacing: -0.06em;
214 text-shadow: 0.04em 0.02em black;
215 }
216
217 #VimFxHelpDialogContainer .logo::before {
218 content: 'ım';
219 margin-left: -0.15em;
220 padding-left: 1.34ch;
221 background: url(icon128.png) no-repeat;
222 background-size: contain;
223 }
224
225 #VimFxHelpDialogContainer .logo::after {
226 content: 'Fx';
227 color: #d37826;
228 }
229
230 #VimFxHelpDialogContainer .title {
231 display: inline-block;
232 font-size: 1.4ex;
233 line-height: 1.2;
234 }
235
236 #VimFxHelpDialogContainer .close-button {
237 position: absolute;
238 right: 0;
239 top: 0;
240 font-size: 3em;
241 -moz-user-select: none;
242 }
243
244 #VimFxHelpDialogContainer .close-button:hover {
245 cursor: pointer;
246 }
247
248 #VimFxHelpDialogContainer .content {
249 display: flex;
250 flex-wrap: wrap;
251 }
252
253 #VimFxHelpDialogContainer .category {
254 flex: 1 16em;
255 margin-left: var(--gutter);
256 margin-bottom: calc(var(--page-padding) / 2);
257 }
258
259 #VimFxHelpDialogContainer .heading-mode,
260 #VimFxHelpDialogContainer .category:not(.first)::before {
261 font-size: 2em;
262 }
263
264 #VimFxHelpDialogContainer .category:not(.first)::before {
265 /* Insert newline the same size as a `.heading-mode` to vertically align all
266 * `.heading-category`s. */
267 content: "\A";
268 white-space: pre;
269 }
270
271 #VimFxHelpDialogContainer .heading-category {
272 font-size: 1.5em;
273 }
274
275 #VimFxHelpDialogContainer .command {
276 float: left;
277 clear: left;
278 width: 100%;
279 margin-top: 0.2em;
280 }
281
282 #VimFxHelpDialogContainer .key-sequence {
283 float: left;
284 margin-right: 1.7ch;
285 }
286
287 #VimFxHelpDialogContainer .key-sequence:last-of-type {
288 margin-right: 0.7ch;
289 }
290
291 #VimFxHelpDialogContainer .key-sequence-special-keys {
292 /* The special keys are not helpful in the help dialog. If somebody
293 * disagrees, they can simply re-show them with custom CSS. */
294 display: none;
295 }
296
297 #VimFxHelpDialogContainer .key-sequence-rest {
298 display: inline;
299 }
300
301 #VimFxHelpDialogContainer .description {
302 float: right;
303 /* The space to the left should be wide enough to fit `<c-w>`. */
304 width: calc(100% - 3.5em);
305 }
306
307 #VimFxHelpDialogContainer .search-input {
308 position: absolute;
309 right: 0;
310 bottom: 0;
311 }
312
313 #VimFxHelpDialogContainer .search-input:not([focused="true"]) {
314 opacity: 0;
315 pointer-events: none;
316 }
317
318 #VimFxHelpDialogContainer .search-match {} /* Keep as documentation. */
319
320 #VimFxHelpDialogContainer .search-non-match {
321 opacity: 0.2;
322 }
323
324 #VimFxHelpDialogContainer .search-highlight {
325 display: inline;
326 background-color: Highlight;
327 color: HighlightText;
328 }
329
330 }
Imprint / Impressum