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: rgba
(0, 0, 0, 0.4);
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
{
122 color: rgba
(0, 0, 0, 0.3);
125 #VimFxMarkersContainer .marker--highlighted
{
126 background-color: lime
;
129 #VimFxMarkersContainer .marker--hidden
{
133 /* alt, ctrl, meta and shift can be targeted. */
134 #main-window[vimfx-held-modifiers
~="ctrl"][vimfx-held-modifiers
~="shift"]
135 #VimFxMarkersContainer {
139 #VimFxMarkersContainer .marker
[data-type
="scrollable"] {
141 padding-right: calc
(var
(--padding
) + var
(--border-width
) + var
(--width
));
144 #VimFxMarkersContainer .marker
[data-type
="scrollable"]::after
{
151 border-left: inherit
;
152 background-image: linear-gradient
(
155 var
(--border-color
) 0,
156 var
(--border-color
) 75%,
163 /***** Help Dialog *****/
165 #VimFxHelpDialogContainer {
169 background-color: Window
;
172 /* Some light-weight themes set a `text-shadow` that the hint markers inherit,
173 * making them almost unreadable. */
181 #VimFxHelpDialogContainer .wrapper
{
189 padding-top: calc
(var
(--page-padding
) / 2);
190 padding-left: calc
(var
(--page-padding
) - var
(--gutter
));
191 padding-right: var
(--page-padding
);
194 #VimFxHelpDialogContainer .vimfx-box
{
198 #VimFxHelpDialogContainer :-moz-any
(.heading-mode
, .heading-category
, .key-sequence
) {
204 #VimFxHelpDialogContainer .header
{
206 margin-left: var
(--gutter
);
207 margin-bottom: calc
(var
(--page-padding
) / 4);
211 #VimFxHelpDialogContainer .heading-main
{
213 /* Add space for the close button. */
217 #VimFxHelpDialogContainer .logo
{
221 font-family: Helvetica
, Arial
, Verdana
, sans-serif
;
223 letter-spacing: -0.035em;
224 text-shadow: 0.04em 0.02em black
;
227 #VimFxHelpDialogContainer .logo::before
{
229 margin-left: -0.15em;
230 padding-left: 1.67ch;
231 background: url
(icon128.png) no-repeat
;
232 background-size: contain
;
235 #VimFxHelpDialogContainer .logo::after
{
240 #VimFxHelpDialogContainer .title
{
241 display: inline-block
;
246 #VimFxHelpDialogContainer .close-button
{
251 -moz-user-select: none
;
254 #VimFxHelpDialogContainer .close-button:hover
{
258 #VimFxHelpDialogContainer .content
{
263 #VimFxHelpDialogContainer .category
{
265 margin-left: var
(--gutter
);
266 margin-bottom: calc
(var
(--page-padding
) / 2);
269 #VimFxHelpDialogContainer :-moz-any
([data-mode
="find"], [data-mode
="marks"]) {
273 #VimFxHelpDialogContainer .heading-mode
,
274 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
278 #VimFxHelpDialogContainer .category:not
(.first
)::before
{
279 /* Insert newline the same size as a `.heading-mode` to vertically align all
280 * `.heading-category`s. */
285 #VimFxHelpDialogContainer .heading-category
{
289 #VimFxHelpDialogContainer .command
{
296 #VimFxHelpDialogContainer .command
.has-click
{
300 #VimFxHelpDialogContainer .command
.has-click:hover
* {
301 text-decoration: underline
;
304 #VimFxHelpDialogContainer .key-sequence
{
309 #VimFxHelpDialogContainer .key-sequence:last-of-type
{
313 #VimFxHelpDialogContainer .key-sequence-special-keys
{
314 /* The special keys are not helpful in the help dialog. If somebody
315 * disagrees, they can simply re-show them with custom CSS. */
319 #VimFxHelpDialogContainer .key-sequence-rest
{
323 #VimFxHelpDialogContainer .description
{
325 width: calc
(100% - 3.7em);
328 #VimFxHelpDialogContainer .search-input
{
334 #VimFxHelpDialogContainer .search-input:not
([focused
="true"]) {
336 pointer-events: none
;
339 #VimFxHelpDialogContainer .search-match
{} /* Keep as documentation. */
341 #VimFxHelpDialogContainer .search-non-match
{
345 #VimFxHelpDialogContainer .search-highlight
{
347 background-color: Highlight
;
348 color: HighlightText
;