]> git.gir.st - VimFx.git/blob - extension/skin/style.css
Major refactor: Rework all UI and related improvements
[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 line-height: 1;
71 font-family: sans-serif;
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-size: 1.6em;
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 .name {
132 display: inline;
133 margin-left: -0.45ch;
134 margin-right: 0.5ch;
135 }
136
137 #VimFxHelpDialogContainer .title {
138 display: inline;
139 font-size: 1.4ex;
140 line-height: 1.2;
141 }
142
143 #VimFxHelpDialogContainer .close-button {
144 position: absolute;
145 right: 0;
146 top: 0;
147 font-size: 3em;
148 -moz-user-select: none;
149 }
150
151 #VimFxHelpDialogContainer .close-button:hover {
152 cursor: pointer;
153 }
154
155 #VimFxHelpDialogContainer .content {
156 display: flex;
157 flex-wrap: wrap;
158 }
159
160 #VimFxHelpDialogContainer .category {
161 flex: 1 16em;
162 margin-left: var(--gutter);
163 margin-bottom: calc(var(--page-padding) / 2);
164 }
165
166 #VimFxHelpDialogContainer .heading-mode,
167 #VimFxHelpDialogContainer .category:not(.first)::before {
168 font-size: 2em;
169 }
170
171 #VimFxHelpDialogContainer .category:not(.first)::before {
172 /* Insert newline the same size as a `.heading-mode` to vertically align all
173 * `.heading-category`s. */
174 content: "\A";
175 white-space: pre;
176 }
177
178 #VimFxHelpDialogContainer .heading-category {
179 font-size: 1.5em;
180 }
181
182 #VimFxHelpDialogContainer .command {
183 float: left;
184 clear: left;
185 width: 100%;
186 margin-top: 0.2em;
187 }
188
189 #VimFxHelpDialogContainer .key-sequence {
190 float: left;
191 margin-right: 1.7ch;
192 }
193
194 #VimFxHelpDialogContainer .key-sequence:last-of-type {
195 margin-right: 0.7ch;
196 }
197
198 #VimFxHelpDialogContainer .description {
199 float: right;
200 /* The space to the left should be wide enough to fit `<c-w>`. */
201 width: calc(100% - 3.5em);
202 }
203
204 }
Imprint / Impressum