]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Consistently use 2-space indentation 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
69
70 /* All styles below are intentionally very generic to fit with the user’s system
71 * and preferences. */
72
73
74
75 /***** Markers *****/
76
77 #VimFxMarkersContainer {
78 position: absolute;
79 }
80
81 /* Marker styles should be kept simple for performance. */
82 #VimFxMarkersContainer .marker {
83 position: absolute;
84 padding: 0.2em;
85 border: solid 1px #ad810c;
86 background-color: #ffd76e;
87 color: #302505;
88 font: menu;
89 line-height: 1;
90 font-weight: bold;
91 text-transform: uppercase;
92 white-space: nowrap;
93 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
94 * making them almost unreadable. */
95 text-shadow: none;
96 }
97
98 #VimFxMarkersContainer .marker-char {} /* Keep as documentation. */
99
100 #VimFxMarkersContainer .marker--matched,
101 #VimFxMarkersContainer .marker-char--matched {
102 color: #ffa22a;
103 }
104
105 #VimFxMarkersContainer .marker--hidden {
106 display: none;
107 }
108
109 /* alt, ctrl and meta can also be targeted. */
110 #main-window[vimfx-held-modifiers~="shift"] #VimFxMarkersContainer {
111 opacity: 0.2;
112 }
113
114
115
116 /***** Help Dialog *****/
117
118 #VimFxHelpDialogContainer {
119 position: absolute;
120 overflow-y: auto;
121 overflow-x: hidden;
122
123 opacity: 0.92;
124 background-color: Window;
125 color: WindowText;
126 font: menu;
127 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
128 * making them almost unreadable. */
129 text-shadow: none;
130
131 --page-padding: 3em;
132 --gutter: 1em;
133 padding-top: calc(var(--page-padding) / 2);
134 padding-left: calc(var(--page-padding) - var(--gutter));
135 padding-right: var(--page-padding);
136 }
137
138 #VimFxHelpDialogContainer * {
139 display: block;
140 }
141
142 #VimFxHelpDialogContainer :-moz-any([class^="heading"], .key-sequence) {
143 font-weight: bold;
144 white-space: nowrap;
145 }
146
147
148 #VimFxHelpDialogContainer .header {
149 position: relative;
150 margin-left: var(--gutter);
151 margin-bottom: calc(var(--page-padding) / 4);
152 }
153
154 #VimFxHelpDialogContainer .heading-main {
155 font-size: 4.2em;
156 /* Add space for the close button. */
157 margin-right: 0.4em;
158 }
159
160 #VimFxHelpDialogContainer .logo {
161 display: inline;
162 margin-right: 0.5ch;
163 color: #349938;
164 font-style: italic;
165 letter-spacing: -0.06em;
166 text-shadow: 0.04em 0.02em black;
167 }
168
169 #VimFxHelpDialogContainer .logo::before {
170 content: 'ım';
171 margin-left: -0.15em;
172 padding-left: 1.34ch;
173 background: url(icon128.png) no-repeat;
174 background-size: contain;
175 }
176
177 #VimFxHelpDialogContainer .logo::after {
178 content: 'Fx';
179 color: #d37826;
180 }
181
182 #VimFxHelpDialogContainer .title {
183 display: inline-block;
184 font-size: 1.4ex;
185 line-height: 1.2;
186 }
187
188 #VimFxHelpDialogContainer .close-button {
189 position: absolute;
190 right: 0;
191 top: 0;
192 font-size: 3em;
193 -moz-user-select: none;
194 }
195
196 #VimFxHelpDialogContainer .close-button:hover {
197 cursor: pointer;
198 }
199
200 #VimFxHelpDialogContainer .content {
201 display: flex;
202 flex-wrap: wrap;
203 }
204
205 #VimFxHelpDialogContainer .category {
206 flex: 1 16em;
207 margin-left: var(--gutter);
208 margin-bottom: calc(var(--page-padding) / 2);
209 }
210
211 #VimFxHelpDialogContainer .heading-mode,
212 #VimFxHelpDialogContainer .category:not(.first)::before {
213 font-size: 2em;
214 }
215
216 #VimFxHelpDialogContainer .category:not(.first)::before {
217 /* Insert newline the same size as a `.heading-mode` to vertically align all
218 * `.heading-category`s. */
219 content: "\A";
220 white-space: pre;
221 }
222
223 #VimFxHelpDialogContainer .heading-category {
224 font-size: 1.5em;
225 }
226
227 #VimFxHelpDialogContainer .command {
228 float: left;
229 clear: left;
230 width: 100%;
231 margin-top: 0.2em;
232 }
233
234 #VimFxHelpDialogContainer .key-sequence {
235 float: left;
236 margin-right: 1.7ch;
237 }
238
239 #VimFxHelpDialogContainer .key-sequence:last-of-type {
240 margin-right: 0.7ch;
241 }
242
243 #VimFxHelpDialogContainer .key-sequence-special-keys {
244 /* The special keys are not helpful in the help dialog. If somebody
245 * disagrees, they can simply re-show them with custom CSS. */
246 display: none;
247 }
248
249 #VimFxHelpDialogContainer .key-sequence-rest {
250 display: inline;
251 }
252
253 #VimFxHelpDialogContainer .description {
254 float: right;
255 /* The space to the left should be wide enough to fit `<c-w>`. */
256 width: calc(100% - 3.5em);
257 }
258
259 }
Imprint / Impressum