File tree Expand file tree Collapse file tree 3 files changed +20
-20
lines changed
Expand file tree Collapse file tree 3 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 1515 let el: HTMLElement ;
1616 export let tooltip: BytemdToolbarItem [' tooltip' ];
1717 export let icon: BytemdToolbarItem [' icon' ];
18+ export let style: string | undefined ;
1819 </script >
1920
2021<svelte:options immutable ={true } />
2122
22- <span bind:this ={el } on:click ={() => dispatch (' click' )}>
23+ <span bind:this ={el } on:click ={() => dispatch (' click' )} { style } >
2324 {@html icon }
2425</span >
Original file line number Diff line number Diff line change 5151 <ToolbarButton
5252 tooltip ={itemMap [id ].tooltip }
5353 icon ={itemMap [id ].icon }
54+ style ={undefined }
5455 on:click ={() => itemMap [id ].onClick (context )} />
5556 {/if }
5657 {/each }
5758 {/if }
5859
59- <div style =" flex-grow:1" />
60-
6160 <ToolbarButton
6261 tooltip =" About ByteMD"
6362 icon ={icons .info }
63+ style =" float:right"
6464 on:click ={() => {
6565 window .open (' https://github.com/bytedance/bytemd' );
6666 }} />
Original file line number Diff line number Diff line change 44
55.bytemd {
66 border : 1px solid $gray-200 ;
7- display : flex ;
8- flex-direction : column ;
97}
108
119.bytemd-toolbar {
12- display : flex ;
13- flex-wrap : wrap ; // For mobile
1410 padding : 4px ;
1511 border-bottom : 1px solid $gray-200 ;
12+ font-size : 0 ;
1613 > span {
14+ display : inline-block ;
1715 cursor : pointer ;
1816 border-radius : 2px ;
1917 margin-left : 4px ;
3230}
3331
3432.bytemd-tabs {
35- display : flex ;
33+ display : inline-block ;
34+ vertical-align : top ;
3635 span {
3736 cursor : pointer ;
3837 padding-left : 8px ;
3938 padding-right : 8px ;
40- line-height : 26 px ;
39+ line-height : 24 px ;
4140 font-size : 14px ;
4241 & .bytemd-tab-active {
4342 color : $blue ;
4948 font-size : 12px ;
5049}
5150
52- .bytemd-info {
53- position : absolute ;
54- }
55-
5651.bytemd-body {
57- flex-grow : 1 ;
58- flex-basis : 0 ; // https://github.com/bytedance/bytemd/issues/8
59- display : flex ;
6052 overflow : auto ;
53+ height : 300px ;
6154}
6255
6356.bytemd-editor {
64- flex : 1 ;
6557 overflow : hidden ;
6658 height : 100% ;
6759 .CodeMirror {
7870}
7971
8072.bytemd-preview {
81- flex : 1 ;
73+ height : 100 % ;
8274 overflow : auto ;
8375 .markdown-body {
8476 padding : 20px ;
8577 }
8678}
8779
88- .bytemd-mode-split .bytemd-preview {
89- border-left : 1px solid $gray-200 ;
80+ .bytemd-mode-split {
81+ .bytemd-editor {
82+ float : left ;
83+ width : 50% ;
84+ }
85+ .bytemd-preview {
86+ margin-left : 50% ;
87+ border-left : 1px solid $gray-200 ;
88+ }
9089}
You can’t perform that action at this time.
0 commit comments