UNPKG

6.11 kBCSSView Raw
1/*-----------------------------------------------------------------------------
2| Copyright (c) Jupyter Development Team.
3| Distributed under the terms of the Modified BSD License.
4|----------------------------------------------------------------------------*/
5
6/*-----------------------------------------------------------------------------
7| Variables
8|----------------------------------------------------------------------------*/
9
10:root {
11 --jp-private-commandpalette-search-height: 28px;
12}
13
14/*-----------------------------------------------------------------------------
15| Overall styles
16|----------------------------------------------------------------------------*/
17
18.lm-CommandPalette {
19 padding-bottom: 0;
20 color: var(--jp-ui-font-color1);
21 background: var(--jp-layout-color1);
22
23 /* This is needed so that all font sizing of children done in ems is
24 * relative to this base size */
25 font-size: var(--jp-ui-font-size1);
26}
27
28/*-----------------------------------------------------------------------------
29| Modal variant
30|----------------------------------------------------------------------------*/
31
32.jp-ModalCommandPalette {
33 position: absolute;
34 z-index: 10000;
35 top: 38px;
36 left: 30%;
37 margin: 0;
38 padding: 4px;
39 width: 40%;
40 box-shadow: var(--jp-elevation-z4);
41 border-radius: 4px;
42 background: var(--jp-layout-color0);
43}
44
45.jp-ModalCommandPalette .lm-CommandPalette {
46 max-height: 40vh;
47}
48
49.jp-ModalCommandPalette .lm-CommandPalette .lm-close-icon::after {
50 display: none;
51}
52
53.jp-ModalCommandPalette .lm-CommandPalette .lm-CommandPalette-header {
54 display: none;
55}
56
57.jp-ModalCommandPalette .lm-CommandPalette .lm-CommandPalette-item {
58 margin-left: 4px;
59 margin-right: 4px;
60}
61
62.jp-ModalCommandPalette
63 .lm-CommandPalette
64 .lm-CommandPalette-item.lm-mod-disabled {
65 display: none;
66}
67
68/*-----------------------------------------------------------------------------
69| Search
70|----------------------------------------------------------------------------*/
71
72.lm-CommandPalette-search {
73 padding: 4px;
74 background-color: var(--jp-layout-color1);
75 z-index: 2;
76}
77
78.lm-CommandPalette-wrapper {
79 /* stylelint-disable-next-line csstree/validator */
80 overflow: overlay;
81 padding: 0 9px;
82 background-color: var(--jp-input-active-background);
83 height: 30px;
84 box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-border-color);
85}
86
87.lm-CommandPalette.lm-mod-focused .lm-CommandPalette-wrapper {
88 box-shadow:
89 inset 0 0 0 1px var(--jp-input-active-box-shadow-color),
90 inset 0 0 0 3px var(--jp-input-active-box-shadow-color);
91}
92
93.jp-SearchIconGroup {
94 color: white;
95 background-color: var(--jp-brand-color1);
96 position: absolute;
97 top: 4px;
98 right: 4px;
99 padding: 5px 5px 1px;
100}
101
102.jp-SearchIconGroup svg {
103 height: 20px;
104 width: 20px;
105}
106
107.jp-SearchIconGroup .jp-icon3[fill] {
108 fill: var(--jp-layout-color0);
109}
110
111.lm-CommandPalette-input {
112 background: transparent;
113 width: calc(100% - 18px);
114 float: left;
115 border: none;
116 outline: none;
117 font-size: var(--jp-ui-font-size1);
118 color: var(--jp-ui-font-color0);
119 line-height: var(--jp-private-commandpalette-search-height);
120}
121
122.lm-CommandPalette-input::-webkit-input-placeholder,
123.lm-CommandPalette-input::-moz-placeholder,
124.lm-CommandPalette-input:-ms-input-placeholder {
125 color: var(--jp-ui-font-color2);
126 font-size: var(--jp-ui-font-size1);
127}
128
129/*-----------------------------------------------------------------------------
130| Results
131|----------------------------------------------------------------------------*/
132
133.lm-CommandPalette-header:first-child {
134 margin-top: 0;
135}
136
137.lm-CommandPalette-header {
138 border-bottom: solid var(--jp-border-width) var(--jp-border-color2);
139 color: var(--jp-ui-font-color1);
140 cursor: pointer;
141 display: flex;
142 font-size: var(--jp-ui-font-size0);
143 font-weight: 600;
144 letter-spacing: 1px;
145 margin-top: 8px;
146 padding: 8px 0 8px 12px;
147 text-transform: uppercase;
148}
149
150.lm-CommandPalette-header.lm-mod-active {
151 background: var(--jp-layout-color2);
152}
153
154.lm-CommandPalette-header > mark {
155 background-color: transparent;
156 font-weight: bold;
157 color: var(--jp-ui-font-color1);
158}
159
160.lm-CommandPalette-item {
161 padding: 4px 12px 4px 4px;
162 color: var(--jp-ui-font-color1);
163 font-size: var(--jp-ui-font-size1);
164 font-weight: 400;
165 display: flex;
166}
167
168.lm-CommandPalette-item.lm-mod-disabled {
169 color: var(--jp-ui-font-color2);
170}
171
172.lm-CommandPalette-item.lm-mod-active {
173 color: var(--jp-ui-inverse-font-color1);
174 background: var(--jp-brand-color1);
175}
176
177.lm-CommandPalette-item.lm-mod-active .lm-CommandPalette-itemLabel > mark {
178 color: var(--jp-ui-inverse-font-color0);
179}
180
181.lm-CommandPalette-item.lm-mod-active .jp-icon-selectable[fill] {
182 fill: var(--jp-layout-color0);
183}
184
185.lm-CommandPalette-item.lm-mod-active:hover:not(.lm-mod-disabled) {
186 color: var(--jp-ui-inverse-font-color1);
187 background: var(--jp-brand-color1);
188}
189
190.lm-CommandPalette-item:hover:not(.lm-mod-active):not(.lm-mod-disabled) {
191 background: var(--jp-layout-color2);
192}
193
194.lm-CommandPalette-itemContent {
195 overflow: hidden;
196}
197
198.lm-CommandPalette-itemLabel > mark {
199 color: var(--jp-ui-font-color0);
200 background-color: transparent;
201 font-weight: bold;
202}
203
204.lm-CommandPalette-item.lm-mod-disabled mark {
205 color: var(--jp-ui-font-color2);
206}
207
208.lm-CommandPalette-item .lm-CommandPalette-itemIcon {
209 margin: 0 4px 0 0;
210 position: relative;
211 width: 16px;
212 top: 2px;
213 flex: 0 0 auto;
214}
215
216.lm-CommandPalette-item.lm-mod-disabled .lm-CommandPalette-itemIcon {
217 opacity: 0.6;
218}
219
220.lm-CommandPalette-item .lm-CommandPalette-itemShortcut {
221 flex: 0 0 auto;
222}
223
224.lm-CommandPalette-itemCaption {
225 display: none;
226}
227
228.lm-CommandPalette-content {
229 background-color: var(--jp-layout-color1);
230}
231
232.lm-CommandPalette-content:empty::after {
233 content: 'No results';
234 margin: auto;
235 margin-top: 20px;
236 width: 100px;
237 display: block;
238 font-size: var(--jp-ui-font-size2);
239 font-family: var(--jp-ui-font-family);
240 font-weight: lighter;
241}
242
243.lm-CommandPalette-emptyMessage {
244 text-align: center;
245 margin-top: 24px;
246 line-height: 1.32;
247 padding: 0 8px;
248 color: var(--jp-content-font-color3);
249}