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