]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Improve markers and help dialog fonts
[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 font-size: 1.6em;
102
103 --page-padding: 3em;
104 --gutter: 1em;
105 padding-top: calc(var(--page-padding) / 2);
106 padding-left: calc(var(--page-padding) - var(--gutter));
107 padding-right: var(--page-padding);
108 }
109
110 #VimFxHelpDialogContainer * {
111 display: block;
112 -moz-user-select: text;
113 }
114
115 #VimFxHelpDialogContainer :-moz-any([class^="heading"], .key-sequence) {
116 font-weight: bold;
117 }
118
119
120 #VimFxHelpDialogContainer .header {
121 position: relative;
122 margin-left: var(--gutter);
123 margin-bottom: calc(var(--page-padding) / 4);
124 }
125
126 #VimFxHelpDialogContainer .heading-main {
127 font-size: 4.2em;
128 /* Add space for the close button. */
129 margin-right: 0.4em;
130 }
131
132 #VimFxHelpDialogContainer .name {
133 display: inline;
134 margin-left: -0.45ch;
135 margin-right: 0.5ch;
136 }
137
138 #VimFxHelpDialogContainer .title {
139 display: inline;
140 font-size: 1.4ex;
141 line-height: 1.2;
142 }
143
144 #VimFxHelpDialogContainer .close-button {
145 position: absolute;
146 right: 0;
147 top: 0;
148 font-size: 3em;
149 -moz-user-select: none;
150 }
151
152 #VimFxHelpDialogContainer .close-button:hover {
153 cursor: pointer;
154 }
155
156 #VimFxHelpDialogContainer .content {
157 display: flex;
158 flex-wrap: wrap;
159 }
160
161 #VimFxHelpDialogContainer .category {
162 flex: 1 16em;
163 margin-left: var(--gutter);
164 margin-bottom: calc(var(--page-padding) / 2);
165 }
166
167 #VimFxHelpDialogContainer .heading-mode,
168 #VimFxHelpDialogContainer .category:not(.first)::before {
169 font-size: 2em;
170 }
171
172 #VimFxHelpDialogContainer .category:not(.first)::before {
173 /* Insert newline the same size as a `.heading-mode` to vertically align all
174 * `.heading-category`s. */
175 content: "\A";
176 white-space: pre;
177 }
178
179 #VimFxHelpDialogContainer .heading-category {
180 font-size: 1.5em;
181 }
182
183 #VimFxHelpDialogContainer .command {
184 float: left;
185 clear: left;
186 width: 100%;
187 margin-top: 0.2em;
188 }
189
190 #VimFxHelpDialogContainer .key-sequence {
191 float: left;
192 margin-right: 1.7ch;
193 }
194
195 #VimFxHelpDialogContainer .key-sequence:last-of-type {
196 margin-right: 0.7ch;
197 }
198
199 #VimFxHelpDialogContainer .description {
200 float: right;
201 /* The space to the left should be wide enough to fit `<c-w>`. */
202 width: calc(100% - 3.5em);
203 }
204
205 }
Imprint / Impressum