Skip to content

Commit a4e4e4d

Browse files
committed
カラフルやめた 灰色 + 線
1 parent a8ab5c5 commit a4e4e4d

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

js/scrapboxCssScript.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,15 @@ const insertIndentCSSRule = (scrapboxIndentOptions) => {
6565
};
6666

6767
const 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

8379
const insertIndentColorCSSRule = (isColoring) => {
@@ -92,7 +88,7 @@ const insertIndentColorCSSRule = (isColoring) => {
9288

9389
if (
9490
cssSelector.match(
95-
/^\.app:not\(.presentation\) \.indent-mark \.char-index:nth-child.*/
91+
/^\.app:not\(\.presentation\) .indent-mark .char-index:not\(:nth-last-child\(1\)\):not\(:nth-last-child\(2\)\)*/
9692
)
9793
) {
9894
document.styleSheets[0].deleteRule(i);

0 commit comments

Comments
 (0)