File tree Expand file tree Collapse file tree
packages/carta-md/src/lib/internal/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 "[svelte]" : {
2323 "editor.defaultFormatter" : " svelte.svelte-vscode"
2424 },
25+ "[scss]" : {
26+ "editor.defaultFormatter" : " esbenp.prettier-vscode"
27+ },
2528 "css.customData" : [" .vscode/tailwind.json" ]
2629}
Original file line number Diff line number Diff line change 11<div class =" discord-plus-icon" >
2- <iconify-icon icon =" radix-icons :plus-circled " class =" text-2xl" ></iconify-icon >
2+ <iconify-icon icon =" icons8 :plus" class =" text-2xl" ></iconify-icon >
33</div >
Original file line number Diff line number Diff line change 1414
1515 .carta-wrapper {
1616 padding : 1rem ;
17- padding-left : 56px ;
1817 flex-grow : 1 ;
19- overflow-y : auto ;
18+ }
19+
20+ .carta-input-wrapper {
21+ padding-left : 36px ;
22+ }
2023
21- .carta-container {
22- min-height : 32px ;
23- max-height : 400px ;
24- }
24+ .carta-input ,
25+ .carta-renderer {
26+ min-height : 32px ;
27+ max-height : 400px ;
28+ overflow : auto ;
2529 }
2630
2731 .carta-font-code {
3741 .discord-plus-icon {
3842 position : absolute ;
3943 top : 15px ;
40- left : -24 px ;
44+ left : 15 px ;
4145 width : 1.75rem ;
4246 height : 1.75rem ;
4347 transform : translateX (-50% ) translateY (-50% );
Original file line number Diff line number Diff line change 1717 .carta-wrapper {
1818 padding : 1rem ;
1919 flex-grow : 1 ;
20- overflow-y : auto ;
20+ }
2121
22- .carta-container {
23- min-height : 120px ;
24- max-height : 160px ;
25- }
22+ .carta-input ,
23+ .carta-renderer {
24+ min-height : 120px ;
25+ max-height : 160px ;
26+ overflow : auto ;
2627 }
2728
2829 .carta-font-code {
Original file line number Diff line number Diff line change 2525 & :focus-within {
2626 outline : 3px solid rgba ($accent , 0.5 );
2727 }
28+ }
2829
29- .carta-container {
30- height : 200px ;
31- }
30+ .carta-input ,
31+ .carta-renderer {
32+ height : 200px ;
33+ overflow : auto ;
3234 }
3335
3436 .carta-font-code {
Original file line number Diff line number Diff line change 4949 textarea .style .height = textarea .scrollHeight + ' px' ;
5050 textarea .scrollTop = 0 ;
5151
52+ const isFocused = document .activeElement === textarea ;
53+ if (! isFocused ) return ;
5254 const coords = carta .input ?.getCursorXY ();
53- elem .scrollTo ({ top: coords ?.top , behavior: ' instant' });
55+ if (! coords ) return ;
56+
57+ if (coords .top < 0 || coords .top >= elem .scrollTop + elem .clientHeight )
58+ elem .scrollTo ({ top: coords ?.top , behavior: ' instant' });
5459 };
5560
5661 const focus = () => {
188193 }
189194
190195 .carta-input-wrapper {
191- height : 100% ;
192196 position : relative ;
193197 font-family : monospace ;
194198 }
You can’t perform that action at this time.
0 commit comments