File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ define([
161
161
var input = $ ( '<div></div>' ) . addClass ( 'input' ) ;
162
162
this . input = input ;
163
163
164
+ var prompt_container = $ ( '<div/>' ) . addClass ( 'prompt_container' ) ;
165
+
164
166
var run_this_cell = $ ( '<div></div>' ) . addClass ( 'run_this_cell' ) ;
165
167
run_this_cell . prop ( 'title' , 'Run this cell' ) ;
166
168
run_this_cell . append ( '<i class="fa-step-forward fa"></i>' ) ;
@@ -170,6 +172,7 @@ define([
170
172
} ) ;
171
173
172
174
var prompt = $ ( '<div/>' ) . addClass ( 'prompt input_prompt' ) ;
175
+
173
176
var inner_cell = $ ( '<div/>' ) . addClass ( 'inner_cell' ) ;
174
177
this . celltoolbar = new celltoolbar . CellToolbar ( {
175
178
cell : this ,
@@ -189,7 +192,8 @@ define([
189
192
this . code_mirror . on ( 'keydown' , $ . proxy ( this . handle_keyevent , this ) ) ;
190
193
$ ( this . code_mirror . getInputField ( ) ) . attr ( "spellcheck" , "false" ) ;
191
194
inner_cell . append ( input_area ) ;
192
- input . append ( run_this_cell ) . append ( prompt ) . append ( inner_cell ) ;
195
+ prompt_container . append ( prompt ) . append ( run_this_cell ) ;
196
+ input . append ( prompt_container ) . append ( inner_cell ) ;
193
197
194
198
var output = $ ( '<div></div>' ) ;
195
199
cell . append ( input ) . append ( output ) ;
Original file line number Diff line number Diff line change @@ -21,34 +21,38 @@ div.input {
21
21
}
22
22
}
23
23
24
+ div .prompt_container {
25
+ display : flex ;
26
+ flex-direction : row ;
27
+ justify-content : space-between ;
28
+ align-items : flex-start ;
29
+ text-align : right ;
30
+ }
31
+
24
32
/* input_area and input_prompt must match in top border and margin for alignment */
25
33
div .input_prompt {
26
34
color : @input_prompt_color ;
27
35
border-top : 1px solid transparent ;
28
36
}
29
37
30
- .run_this_cell {
31
- visibility : hidden ;
38
+ div .run_this_cell {
39
+ display : none ;
32
40
cursor : pointer ;
33
41
color : #333 ;
34
42
padding-top : 5px ;
35
43
padding-bottom : 5px ;
36
- padding-left : 1 ex ;
37
- padding-right : 1 ex ;
44
+ padding-left : 2 ex ;
45
+ padding-right : 2 ex ;
38
46
width : 1ex ;
39
47
}
40
48
41
49
div .code_cell div .input_prompt {
42
- min-width : 11ex ;
43
- }
44
-
45
- div .code_cell :hover div .input .run_this_cell {
46
- visibility : visible ;
50
+ min-width : 15ex ;
47
51
}
48
52
49
53
@media (-moz-touch-enabled : 1 ), (any- pointer: coarse) {
50
- .run_this_cell {
51
- visibility : visible ;
54
+ div .run_this_cell {
55
+ display : block ;
52
56
}
53
57
}
54
58
You can’t perform that action at this time.
0 commit comments