2 * Copyright Simon Lydell 2015, 2016.
4 * This file is part of VimFx.
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.
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.
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/>.
20 /* Allow file:/// prefix for testing using `gulp {help,hints}.html`. */
21 @-moz-document url
(chrome://browser
/content
/browser
.xul
), url-prefix
(file:///)
27 list-style-image: url
(icon16.png);
30 #main-window[vimfx-mode
="ignore"] #VimFxButton
{
31 list-style-image: url
(icon16-red
.png
);
34 #VimFxButton[cui-areatype
="menu-panel"],
35 toolbarpaletteitem
[place
="palette"] > #VimFxButton
{
36 list-style-image: url
(icon32.png);
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
);
44 @media (min-resolution: 2dppx) {
46 list-style-image: url
(icon32.png);
49 #main-window[vimfx-mode
="ignore"] #VimFxButton
{
50 list-style-image: url
(icon32-red
.png
);
53 #VimFxButton[cui-areatype
="menu-panel"],
54 toolbarpaletteitem
[place
="palette"] > #VimFxButton
{
55 list-style-image: url
(icon64.png);
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
);
64 #main-window:-moz-any
(
65 [vimfx-mode
="normal"][vimfx-focus-type
="editable"],
66 [vimfx-mode
="find"][vimfx-focus-type
="findbar"]
67 ) #VimFxButton image
{
68 filter: grayscale
(100%) brightness
(150%);
73 /* All styles below are intentionally very generic to fit with the user’s system
80 #VimFxMarkersContainer {
85 #VimFxMarkersContainer.ui
{
94 /* Marker styles should be kept simple for performance. */
95 #VimFxMarkersContainer .marker
{
98 padding: var
(--padding
);
99 --border-color: #ad810c;
101 border: solid var
(--border-width
) var
(--border-color
);
102 background-color: #ffd76e;
107 text-transform: uppercase
;
109 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
110 * making them almost unreadable. */
114 #VimFxMarkersContainer .marker-char
{} /* Keep as documentation. */
116 #VimFxMarkersContainer .marker--matched
,
117 #VimFxMarkersContainer .marker-char--matched
{
121 #VimFxMarkersContainer .marker--hidden
{
125 /* alt, ctrl and meta can also be targeted. */
126 #main-window[vimfx-held-modifiers
~="shift"] #VimFxMarkersContainer
{
130 #VimFxMarkersContainer .marker
[data-type
="scrollable"] {
132 padding-right: calc
(var
(--padding
) + var
(--border-width
) + var
(--width
));
135 #VimFxMarkersContainer .marker
[data-type
="scrollable"]::after
{
142 border-left: inherit
;
143 background-image: linear-gradient
(
146 var
(--border-color
) 0,
147 var
(--border-color
) 75%,
154 /***** Help Dialog *****/
156 #VimFxHelpDialogContainer {
160 background-color: Window
;
163 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
164 * making them almost unreadable. */
172 #VimFxHelpDialogContainer .wrapper
{
180 padding-top: calc
(var
(--page-padding
) / 2);
181 padding-left: calc
(var
(--page-padding
) - var
(--gutter
));
182 padding-right: var
(--page-padding
);
185 #VimFxHelpDialogContainer .vimfx-box
{
189 #VimFxHelpDialogContainer :-moz-any
(.heading-mode
, .heading-category
, .key-sequence
) {
195 #VimFxHelpDialogContainer .header
{
197 margin-left: var
(--gutter
);
198 margin-bottom: calc
(var
(--page-padding
) / 4);
202 #VimFxHelpDialogContainer .heading-main
{
204 /* Add space for the close button. */
208 #VimFxHelpDialogContainer .logo
{
212 font-family: Helvetica
, Arial
, Verdana
, sans-serif
;
214 letter-spacing: -0.035em;
215 text-shadow: 0.04em 0.02em black
;
218 #VimFxHelpDialogContainer .logo::before
{
220 margin-left: -0.15em;
221 padding-left: 1.67ch;
222 background: url
(icon128.png) no-repeat
;
223 background-size: contain
;
226 #VimFxHelpDialogContainer .logo::after
{
231 #VimFxHelpDialogContainer .title
{
232 display: inline-block
;
237 #VimFxHelpDialogContainer .close-button
{
242 -moz-user-select: none
;
245 #VimFxHelpDialogContainer .close-button:hover
{
249 #VimFxHelpDialogContainer .content
{
254 #VimFxHelpDialogContainer .category
{
256 margin-left: var
(--gutter
);
257 margin-bottom: calc
(var
(--page-padding
) / 2);
260 #VimFxHelpDialogContainer :-moz-any
([data-mode
="find"], [data-mode
="marks"]) {
264 #VimFxHelpDialogContainer .heading-mode
,
265 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
269 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
270 /* Insert newline the same size as a `.heading-mode` to vertically align all
271 * `.heading-category`s. */
276 #VimFxHelpDialogContainer .heading-category
{
280 #VimFxHelpDialogContainer .command
{
287 #VimFxHelpDialogContainer .command
.has-click
{
291 #VimFxHelpDialogContainer .command
.has-click:hover
* {
292 text-decoration: underline
;
295 #VimFxHelpDialogContainer .key-sequence
{
300 #VimFxHelpDialogContainer .key-sequence:last-of-type
{
304 #VimFxHelpDialogContainer .key-sequence-special-keys
{
305 /* The special keys are not helpful in the help dialog. If somebody
306 * disagrees, they can simply re-show them with custom CSS. */
310 #VimFxHelpDialogContainer .key-sequence-rest
{
314 #VimFxHelpDialogContainer .description
{
316 width: calc
(100% - 3.7em);
319 #VimFxHelpDialogContainer .search-input
{
325 #VimFxHelpDialogContainer .search-input:not
([focused
="true"]) {
327 pointer-events: none
;
330 #VimFxHelpDialogContainer .search-match
{} /* Keep as documentation. */
332 #VimFxHelpDialogContainer .search-non-match
{
336 #VimFxHelpDialogContainer .search-highlight
{
338 background-color: Highlight
;
339 color: HighlightText
;