]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Improve line-wrapping of the help dialog title
[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 #VimFxButton[cui-areatype="menu-panel"],
31 toolbarpaletteitem[place="palette"] > #VimFxButton {
32 list-style-image: url(icon32.png);
33 }
34
35 @media (min-resolution: 2dppx) {
36 #VimFxButton {
37 list-style-image: url(icon32.png);
38 }
39
40 #VimFxButton[cui-areatype="menu-panel"],
41 toolbarpaletteitem[place="palette"] > #VimFxButton {
42 list-style-image: url(icon64.png);
43 }
44 }
45
46 #VimFxButton[vimfx-mode="insert"] {
47 filter: grayscale(100%);
48 }
49
50
51
52 /* All styles below are intentionally very generic to fit with the user’s system
53 * and preferences. */
54
55
56
57 /***** Markers *****/
58
59 #VimFxMarkersContainer {
60 position: absolute;
61 }
62
63 /* Marker styles should be kept simple for performance. */
64 #VimFxMarkersContainer .marker {
65 position: absolute;
66 padding: 0.2em;
67 border: solid 1px #ad810c;
68 background-color: #ffd76e;
69 color: #302505;
70 font: menu;
71 line-height: 1;
72 font-weight: bold;
73 text-transform: uppercase;
74 white-space: nowrap;
75 }
76
77 #VimFxMarkersContainer .marker-char {} /* Keep as documentation. */
78
79 #VimFxMarkersContainer .marker--matched,
80 #VimFxMarkersContainer .marker-char--matched {
81 color: #ffa22a;
82 }
83
84 #VimFxMarkersContainer .marker--hidden {
85 display: none;
86 }
87
88
89
90 /***** Help Dialog *****/
91
92 #VimFxHelpDialogContainer {
93 position: absolute;
94 overflow-y: auto;
95 overflow-x: hidden;
96
97 opacity: 0.92;
98 background-color: Window;
99 color: WindowText;
100 font: menu;
101
102 --page-padding: 3em;
103 --gutter: 1em;
104 padding-top: calc(var(--page-padding) / 2);
105 padding-left: calc(var(--page-padding) - var(--gutter));
106 padding-right: var(--page-padding);
107 }
108
109 #VimFxHelpDialogContainer * {
110 display: block;
111 -moz-user-select: text;
112 }
113
114 #VimFxHelpDialogContainer :-moz-any([class^="heading"], .key-sequence) {
115 font-weight: bold;
116 }
117
118
119 #VimFxHelpDialogContainer .header {
120 position: relative;
121 margin-left: var(--gutter);
122 margin-bottom: calc(var(--page-padding) / 4);
123 }
124
125 #VimFxHelpDialogContainer .heading-main {
126 font-size: 4.2em;
127 /* Add space for the close button. */
128 margin-right: 0.4em;
129 }
130
131 #VimFxHelpDialogContainer .logo {
132 display: inline;
133 margin-right: 0.5ch;
134 color: #349938;
135 font-style: italic;
136 letter-spacing: -0.06em;
137 text-shadow: 0.04em 0.02em black;
138 }
139
140 #VimFxHelpDialogContainer .logo::before {
141 content: 'ım';
142 margin-left: -0.15em;
143 padding-left: 1.34ch;
144 background: url(icon128.png) no-repeat;
145 background-size: contain;
146 }
147
148 #VimFxHelpDialogContainer .logo::after {
149 content: 'Fx';
150 color: #d37826;
151 }
152
153 #VimFxHelpDialogContainer .title {
154 display: inline-block;
155 font-size: 1.4ex;
156 line-height: 1.2;
157 }
158
159 #VimFxHelpDialogContainer .close-button {
160 position: absolute;
161 right: 0;
162 top: 0;
163 font-size: 3em;
164 -moz-user-select: none;
165 }
166
167 #VimFxHelpDialogContainer .close-button:hover {
168 cursor: pointer;
169 }
170
171 #VimFxHelpDialogContainer .content {
172 display: flex;
173 flex-wrap: wrap;
174 }
175
176 #VimFxHelpDialogContainer .category {
177 flex: 1 16em;
178 margin-left: var(--gutter);
179 margin-bottom: calc(var(--page-padding) / 2);
180 }
181
182 #VimFxHelpDialogContainer .heading-mode,
183 #VimFxHelpDialogContainer .category:not(.first)::before {
184 font-size: 2em;
185 }
186
187 #VimFxHelpDialogContainer .category:not(.first)::before {
188 /* Insert newline the same size as a `.heading-mode` to vertically align all
189 * `.heading-category`s. */
190 content: "\A";
191 white-space: pre;
192 }
193
194 #VimFxHelpDialogContainer .heading-category {
195 font-size: 1.5em;
196 }
197
198 #VimFxHelpDialogContainer .command {
199 float: left;
200 clear: left;
201 width: 100%;
202 margin-top: 0.2em;
203 }
204
205 #VimFxHelpDialogContainer .key-sequence {
206 float: left;
207 margin-right: 1.7ch;
208 }
209
210 #VimFxHelpDialogContainer .key-sequence:last-of-type {
211 margin-right: 0.7ch;
212 }
213
214 #VimFxHelpDialogContainer .description {
215 float: right;
216 /* The space to the left should be wide enough to fit `<c-w>`. */
217 width: calc(100% - 3.5em);
218 }
219
220 }
Imprint / Impressum