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 {
86 #VimFxMarkersContainer.ui
{
95 /* Marker styles should be kept simple for performance. */
96 #VimFxMarkersContainer .marker
{
99 padding: var
(--padding
);
100 --border-color: #ad810c;
102 border: solid var
(--border-width
) var
(--border-color
);
103 background-color: #ffd76e;
109 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
110 * making them almost unreadable. */
114 #VimFxMarkersContainer:not
(.has-mixedcase
) .marker
{
115 text-transform: uppercase
;
118 #VimFxMarkersContainer .marker-char
{} /* Keep as documentation. */
120 #VimFxMarkersContainer .marker--matched
,
121 #VimFxMarkersContainer .marker-char--matched
{
125 #VimFxMarkersContainer .marker--highlighted
{
126 --border-color: black
;
127 border-radius: 0.34em;
128 box-shadow: inset
0 0 0.28em 0 var
(--border-color
), 0 0 0 var
(--border-width
) white
;
131 #VimFxMarkersContainer .marker--hidden
{
135 /* alt, ctrl, meta and shift can be targeted. */
136 #main-window[vimfx-held-modifiers
~="ctrl"][vimfx-held-modifiers
~="shift"]
137 #VimFxMarkersContainer {
141 #VimFxMarkersContainer .marker
[data-type
="scrollable"] {
143 padding-right: calc
(var
(--padding
) + var
(--border-width
) + var
(--width
));
146 #VimFxMarkersContainer .marker
[data-type
="scrollable"]::after
{
153 border-left: inherit
;
154 background-image: linear-gradient
(
157 var
(--border-color
) 0,
158 var
(--border-color
) 75%,
165 /***** Help Dialog *****/
167 #VimFxHelpDialogContainer {
171 background-color: Window
;
174 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
175 * making them almost unreadable. */
183 #VimFxHelpDialogContainer .wrapper
{
191 padding-top: calc
(var
(--page-padding
) / 2);
192 padding-left: calc
(var
(--page-padding
) - var
(--gutter
));
193 padding-right: var
(--page-padding
);
196 #VimFxHelpDialogContainer .vimfx-box
{
200 #VimFxHelpDialogContainer :-moz-any
(.heading-mode
, .heading-category
, .key-sequence
) {
206 #VimFxHelpDialogContainer .header
{
208 margin-left: var
(--gutter
);
209 margin-bottom: calc
(var
(--page-padding
) / 4);
213 #VimFxHelpDialogContainer .heading-main
{
215 /* Add space for the close button. */
219 #VimFxHelpDialogContainer .logo
{
223 font-family: Helvetica
, Arial
, Verdana
, sans-serif
;
225 letter-spacing: -0.035em;
226 text-shadow: 0.04em 0.02em black
;
229 #VimFxHelpDialogContainer .logo::before
{
231 margin-left: -0.15em;
232 padding-left: 1.67ch;
233 background: url
(icon128.png) no-repeat
;
234 background-size: contain
;
237 #VimFxHelpDialogContainer .logo::after
{
242 #VimFxHelpDialogContainer .title
{
243 display: inline-block
;
248 #VimFxHelpDialogContainer .close-button
{
253 -moz-user-select: none
;
256 #VimFxHelpDialogContainer .close-button:hover
{
260 #VimFxHelpDialogContainer .content
{
265 #VimFxHelpDialogContainer .category
{
267 margin-left: var
(--gutter
);
268 margin-bottom: calc
(var
(--page-padding
) / 2);
271 #VimFxHelpDialogContainer :-moz-any
([data-mode
="find"], [data-mode
="marks"]) {
275 #VimFxHelpDialogContainer .heading-mode
,
276 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
280 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
281 /* Insert newline the same size as a `.heading-mode` to vertically align all
282 * `.heading-category`s. */
287 #VimFxHelpDialogContainer .heading-category
{
291 #VimFxHelpDialogContainer .command
{
298 #VimFxHelpDialogContainer .command
.has-click
{
302 #VimFxHelpDialogContainer .command
.has-click:hover
* {
303 text-decoration: underline
;
306 #VimFxHelpDialogContainer .key-sequence
{
311 #VimFxHelpDialogContainer .key-sequence:last-of-type
{
315 #VimFxHelpDialogContainer .key-sequence-special-keys
{
316 /* The special keys are not helpful in the help dialog. If somebody
317 * disagrees, they can simply re-show them with custom CSS. */
321 #VimFxHelpDialogContainer .key-sequence-rest
{
325 #VimFxHelpDialogContainer .description
{
327 width: calc
(100% - 3.7em);
330 #VimFxHelpDialogContainer .search-input
{
336 #VimFxHelpDialogContainer .search-input:not
([focused
="true"]) {
338 pointer-events: none
;
341 #VimFxHelpDialogContainer .search-match
{} /* Keep as documentation. */
343 #VimFxHelpDialogContainer .search-non-match
{
347 #VimFxHelpDialogContainer .search-highlight
{
349 background-color: Highlight
;
350 color: HighlightText
;