@@ -188,21 +188,28 @@ header {
188188 overflow : hidden;
189189}
190190
191- .editor {
191+ .editor , . source-view {
192192 display : flex;
193- flex : 1 ;
194- min-height : 0 ;
195193 font-family : var (--font-mono );
196194 font-size : var (--fs-md );
197195 line-height : 1.54 ;
198196 background : var (--main-bg-color , var (--page-bg ));
199197 color : var (--main-fg-color , var (--fg ));
200198}
201199
200+ .editor {
201+ flex : 1 ;
202+ min-height : 0 ;
203+ }
204+
205+ .source-view {
206+ min-height : 100% ;
207+ }
208+
202209# line-numbers {
203210 display : block;
204211 flex : 0 0 auto;
205- padding : 14px 12 px 14 px 16 px ;
212+ padding : 14px 0 ;
206213 text-align : right;
207214 background : var (--gutter-bg );
208215 color : var (--gutter-fg );
@@ -216,6 +223,7 @@ header {
216223# line-numbers div {
217224 height : 1.54em ;
218225 line-height : 1.54em ;
226+ padding : 0 12px 0 16px ;
219227}
220228
221229.editor textarea {
@@ -647,52 +655,65 @@ table {
647655 min-width : max-content;
648656}
649657
650- .src td : first-child {
651- user-select : none;
652- padding : 0 12px 0 18px ;
653- text-align : right;
654- color : var (--gutter-fg );
655- background : var (--gutter-bg );
656- border-right : 1px solid var (--border-soft );
657- font-variant-numeric : tabular-nums;
658- font-family : var (--font-mono );
659- font-size : var (--fs-md );
660- line-height : 1.69 ;
661- width : 1px ;
662- white-space : nowrap;
658+ /* source view (paste) — matches editor layout */
659+
660+ .source-view > # line-numbers {
661+ flex : 0 0 auto;
663662}
664663
665- .src td : first-child > a , .src td : first-child > a : visited {
666- color : var (--gutter-fg );
664+ .source-view > .src-code {
665+ flex : 1 ;
666+ margin : 0 ;
667+ padding : 14px 0 ;
668+ border : 0 ;
669+ background : transparent;
670+ color : inherit;
671+ font-family : inherit;
672+ font-size : inherit;
673+ line-height : inherit;
674+ white-space : pre;
675+ tab-size : 2 ;
667676}
668677
669- .src td : first-child > a : hover , .src td : first-child > a : focus {
670- color : var ( --accent ) ;
678+ .source-view > .src-code code {
679+ display : block ;
671680}
672681
673- .src td + td {
674- padding : 0 18px 0 14px ;
675- white-space : pre;
676- font-family : var (--font-mono );
677- font-size : var (--fs-md );
678- line-height : 1.69 ;
679- user-select : text;
682+ .source-view .src-code [id ^= "LC" ] {
683+ padding : 0 16px ;
680684}
681685
682- .line-wrap .src td + td {
683- white-space : pre-wrap;
684- word-wrap : break-word;
686+ /* line number links in paste view */
687+
688+ .source-view # line-numbers a ,
689+ .source-view # line-numbers a : visited {
690+ color : var (--gutter-fg );
691+ text-decoration : none;
692+ }
693+
694+ .source-view # line-numbers a : hover ,
695+ .source-view # line-numbers a : focus {
696+ color : var (--accent );
685697}
686698
687- .src tr .line-highlight > td : first-child {
699+ /* line highlighting */
700+
701+ .source-view # line-numbers .line-highlight {
688702 background : var (--accent-bg-gutter );
689703 font-weight : bold;
690704}
691705
692- .src tr .line-highlight > td + td {
706+ .source-view . src-code .line-highlight {
693707 background : var (--accent-bg );
694708}
695709
710+ /* line wrapping */
711+
712+ .line-wrap .source-view > .src-code {
713+ white-space : pre-wrap;
714+ word-wrap : break-word;
715+ }
716+
696717.markup .underline .link > a , .markup .underline .link > a : visited {
697718 color : inherit;
698719}
0 commit comments