]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Reset `text-shadow` for hint markers
[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
124 --page-padding: 3em;
125 --gutter: 1em;
126 padding-top: calc(var(--page-padding) / 2);
127 padding-left: calc(var(--page-padding) - var(--gutter));
128 padding-right: var(--page-padding);
129 }
130
131 #VimFxHelpDialogContainer * {
132 display: block;
133 }
134
135 #VimFxHelpDialogContainer :-moz-any([class^="heading"], .key-sequence) {
136 font-weight: bold;
137 white-space: nowrap;
138 }
139
140
141 #VimFxHelpDialogContainer .header {
142 position: relative;
143 margin-left: var(--gutter);
144 margin-bottom: calc(var(--page-padding) / 4);
145 }
146
147 #VimFxHelpDialogContainer .heading-main {
148 font-size: 4.2em;
149 /* Add space for the close button. */
150 margin-right: 0.4em;
151 }
152
153 #VimFxHelpDialogContainer .logo {
154 display: inline;
155 margin-right: 0.5ch;
156 color: #349938;
157 font-style: italic;
158 letter-spacing: -0.06em;
159 text-shadow: 0.04em 0.02em black;
160 }
161
162 #VimFxHelpDialogContainer .logo::before {
163 content: 'ım';
164 margin-left: -0.15em;
165 padding-left: 1.34ch;
166 background: url(icon128.png) no-repeat;
167 background-size: contain;
168 }
169
170 #VimFxHelpDialogContainer .logo::after {
171 content: 'Fx';
172 color: #d37826;
173 }
174
175 #VimFxHelpDialogContainer .title {
176 display: inline-block;
177 font-size: 1.4ex;
178 line-height: 1.2;
179 }
180
181 #VimFxHelpDialogContainer .close-button {
182 position: absolute;
183 right: 0;
184 top: 0;
185 font-size: 3em;
186 -moz-user-select: none;
187 }
188
189 #VimFxHelpDialogContainer .close-button:hover {
190 cursor: pointer;
191 }
192
193 #VimFxHelpDialogContainer .content {
194 display: flex;
195 flex-wrap: wrap;
196 }
197
198 #VimFxHelpDialogContainer .category {
199 flex: 1 16em;
200 margin-left: var(--gutter);
201 margin-bottom: calc(var(--page-padding) / 2);
202 }
203
204 #VimFxHelpDialogContainer .heading-mode,
205 #VimFxHelpDialogContainer .category:not(.first)::before {
206 font-size: 2em;
207 }
208
209 #VimFxHelpDialogContainer .category:not(.first)::before {
210 /* Insert newline the same size as a `.heading-mode` to vertically align all
211 * `.heading-category`s. */
212 content: "\A";
213 white-space: pre;
214 }
215
216 #VimFxHelpDialogContainer .heading-category {
217 font-size: 1.5em;
218 }
219
220 #VimFxHelpDialogContainer .command {
221 float: left;
222 clear: left;
223 width: 100%;
224 margin-top: 0.2em;
225 }
226
227 #VimFxHelpDialogContainer .key-sequence {
228 float: left;
229 margin-right: 1.7ch;
230 }
231
232 #VimFxHelpDialogContainer .key-sequence:last-of-type {
233 margin-right: 0.7ch;
234 }
235
236 #VimFxHelpDialogContainer .key-sequence-special-keys {
237 /* The special keys are not helpful in the help dialog. If somebody
238 * disagrees, they can simply re-show them with custom CSS. */
239 display: none;
240 }
241
242 #VimFxHelpDialogContainer .key-sequence-rest {
243 display: inline;
244 }
245
246 #VimFxHelpDialogContainer .description {
247 float: right;
248 /* The space to the left should be wide enough to fit `<c-w>`. */
249 width: calc(100% - 3.5em);
250 }
251
252 }
Imprint / Impressum