@@ -65,19 +65,15 @@ const insertIndentCSSRule = (scrapboxIndentOptions) => {
6565} ;
6666
6767const indentColorCSS = [
68- `.indent-mark .char-index{
69- --scrapbox-indent-maker-opacity: 0.2;
70- --scrapbox-indent-maker-yellow: rgba(255,255,64, var(--scrapbox-indent-maker-opacity));
71- --scrapbox-indent-maker-green: rgba(127,255,127, var(--scrapbox-indent-maker-opacity));
72- --scrapbox-indent-maker-red: rgba(255,127,255, var(--scrapbox-indent-maker-opacity));
73- --scrapbox-indent-maker-blue: rgba(79,236,236, var(--scrapbox-indent-maker-opacity));
74- }` ,
75- `.app:not(.presentation) .indent-mark .char-index:nth-child(4n+1) { background-color: var(--scrapbox-indent-maker-yellow) }` ,
76- `.app:not(.presentation) .indent-mark .char-index:nth-child(4n+2) { background-color: var(--scrapbox-indent-maker-green) }` ,
77- `.app:not(.presentation) .indent-mark .char-index:nth-child(4n+3) { background-color: var(--scrapbox-indent-maker-red) }` ,
78- `.app:not(.presentation) .indent-mark .char-index:nth-child(4n) { background-color: var(--scrapbox-indent-maker-blue) }` ,
79- `.app:not(.presentation) .indent-mark .char-index:nth-last-child(2) { background-color: transparent !important; }` ,
80- `.app:not(.presentation) .indent-mark .char-index:nth-last-child(1) { background-color: transparent !important; }` ,
68+ `.app:not(.presentation) .indent-mark .char-index:not(:nth-last-child(1)):not(:nth-last-child(2)) { position: relative; }` ,
69+ `.app:not(.presentation) .indent-mark .char-index:not(:nth-last-child(1)):not(:nth-last-child(2))::before {
70+ content: " ";
71+ position: absolute;
72+ left: 47%;
73+ top: -24%;
74+ border-left: 0.2rem solid #dcdcdc;
75+ }` ,
76+ `.app:not(.presentation) .indent-mark .char-index:not(:nth-last-child(1)):not(:nth-last-child(2)):nth-child(n) { background-color: #f5f5f5 }` ,
8177] ;
8278
8379const insertIndentColorCSSRule = ( isColoring ) => {
@@ -92,7 +88,7 @@ const insertIndentColorCSSRule = (isColoring) => {
9288
9389 if (
9490 cssSelector . match (
95- / ^ \. a p p : n o t \( .p r e s e n t a t i o n \) \ .i n d e n t - m a r k \ .c h a r - i n d e x : n t h - c h i l d . * /
91+ / ^ \. a p p : n o t \( \ .p r e s e n t a t i o n \) .i n d e n t - m a r k .c h a r - i n d e x : n o t \( : n t h - l a s t - c h i l d \( 1 \) \) : n o t \( : n t h - l a s t - c h i l d \( 2 \) \) * /
9692 )
9793 ) {
9894 document . styleSheets [ 0 ] . deleteRule ( i ) ;
0 commit comments