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