settings
UserCSS
Scrapboxの拡張機能の一つ。仲間にUserScriptがある。
それぞれのユーザーがCSSを自由に設定できる。
閲覧者全体に効かせる場合は、「settings」というページを作り、そこにコードブロックで記入する。
ユーザーだけ(自分だけ)に効かせる場合は、「自分のページ」にコードブロックで記入する。
プライベートで一人だけで使っている場合は、どちらに書いても効果は同じ。
Tips
/help-jp/UserCSS
以下UserCSS
キリトリ.icon
Font
code:style.css
@import url('https://fonts.googleapis.com/css?family=M+PLUS+1p:700&subset=japanese');
@import url('https://fonts.googleapis.com/css?family=Kosugi+Maru&display=swap');
.line {
font-family: 'Kosugi Maru', sans-serif;
}
.title, .line-title {
font-family: 'M PLUS 1p', sans-serif;
}
見出し
code:style.css
/* 拡張装飾記法 見出しっぽい太字テキスト←記述の仕方 */
.level .deco-\# {
border-left: .2em solid #39AC86; /* 左端太線の色 */
padding-left: .7rem:
margin-right: .2em;
font-size: 1.2em;
color: #222; /* 文字色 */
}
/* 見出しを小さくする */
.line.line-title .text {
font-size: 0.8em;
}
重要・強調
code:style.css
/* 拡張装飾記法 \! 重要・強調 */
.deco-\! {
color: #FFC107;
}
例1:重要・強調
下線
code:style.css
/* 拡張装飾記法:重要 青下線 */
.deco-\+ {
background: linear-gradient(transparent 85%, #2979FF 0%);
color: #222;
}
/* 拡張装飾記法:とても重要 赤下線 */
.deco-\| {
background: linear-gradient(transparent 85%, #FF0000 0%);
color: #222;
font-weight: bold;
}
/* 拡張装飾記法:事例・引用 緑下線 */
.deco-\' {
background: linear-gradient(transparent 85%, #4CAF50 0%);
color: #222;
}
例2:重要だと考える箇所は青
例3:とても重要だと考える箇所は赤
例4:事例・引用箇所には緑(もしくは主観的に重要・面白いと感じた箇所)
引用
code:style.css
/* 拡張装飾記法 文中引用 */
.deco-\" {
border-radius: .2em;
padding: 0 .4em;
background-color: rgba(128,128,128,0.1);
font-size: 95%;
}
.deco-\"::before {
color: #636161; font-size:85%;
font-family: 'FontAwesome';
content: '\f10d';
vertical-align: super;
}
/* 引用 > */
.line .quote {
font-style: normal;
color: #8f8d8d;
border-left: solid 2px #373d44;
padding-left: 8px;
}
ハッシュで始まるタグをラベル風にするCSS
code: style.css
/* #で始まるタグをラベル風にする */
atype="hashTag"{
display: inline-block;
padding: 2px 8px;
margin: 0 8px 10px 0;
background: #fff;
color: #f27e48;
font-size: 0.8em;
border: 1px solid #f27e48;
border-radius: 3px;
transition: .3s;
-webkit-transform: scale(1);
transform: scale(1);
}
atype="hashTag":hover{
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
参照:
/memooooo/settings
/MISONLN41/settings#5e64f016ec4fce0000f2a76b
Other
code:style.css
/* 太字 */
.line strong { color: #009999; }
/* 新着のテロメアの色と太さ */
.line .telomere .telomere-border.unread { background-color: #fcc; width: 5px }
/* フキダシ記法版 */
.line:not(.cursor-line) .deco-\{ {
display: inline-block; position: relative; max-width: calc(100% - 4em);
line-height: 1; color: #FFF !important; background-color: rgba(94, 176, 220, 0.85);
padding: 8px 6px 4px 7px; margin-left: .6em;
border-radius: .4em; border-bottom-left-radius: 0 }
.line:not(.cursor-line) .deco-\{::after {
display: block; /* reduce the damage in FF3.0 */
position: absolute; bottom: 0; left: -0.45em;
width: 0; content: '';
border-width: 0 0 .5em .5em; border-style: solid; border-color: rgba(94, 176, 220, 0.85) transparent}
/* 付箋記法のスタイル例 */
.line:not(.cursor-line) .deco-\~ {
display: inline-block; position: absolute; top: -0.6em; right: -6vw;
max-width: 40%; padding: .3rem 1rem;
border-right: 1rem solid #04B2D9;
background-color: #f9f8f6;
transform: rotate(-0.8deg); box-shadow: 4px 1px 3px rgba(0,0,0,.2) }
@media screen and (max-width: 768px) { .line:not(.cursor-line) .deco-\~ { position: static; max-width: 100% } }
.presentation .line .deco-\~ { position: static; max-width: 100% }
@media print { .line:not(.cursor-line) .deco-\~ {
right: 0; border-bottom: 1px solid #ccc; background-color: #f9f8f6 } }
/* 太字記法との組み合わせでスタイルを変える場合 */
.line .level-2 .deco-\~ { border-right-color: #009175 }
.line .level-3 .deco-\~ { border-right-color: #EFBB33 }
.line .level-4 .deco-\~ { border-right-color: #F23E2E }
/* 付箋記法内で打消し線記法と下線記法を併用する場合 */
.line .deco-\~.deco-- { text-decoration: line-through }
.line .deco-\~.deco-_ { text-decoration: underline }
/* 拡張装飾記法1 見出しっぽい太字テキスト */
.level .deco-\# { border-left: .3em solid #102423; padding-left: .7rem }
/* 拡張装飾記法2 文中引用 */
.deco-\" {
border-radius: .2em; padding: 0 .4em; background-color: rgba(128,128,128,0.1);
font-size:95%; font-style: italic }
.deco-\"::before {
color: #a0a0a0; font-size:85%; font-family: 'FontAwesome'; content: '\f10d'; vertical-align: super }
/* 拡張装飾記法3 控えめのコメント */
.deco-\# { color: green; font-size: smaller; padding: 0 .2em }
/* 拡張装飾記法4 挿入 */
.deco-\+ { color: blue }
/* 拡張装飾記法5 挿入取り消し */
.deco-\+.deco-- { color: lightgrey }
.deco-\+.deco--::before {
content: 'イキ'; display: inline-block;
color: blue; font-size: smaller; text-decoration: none !important; vertical-align: super }
/* 拡張装飾記法6 \! 重要・強調 */
.deco-\! {
color: #fff; /* 白文字 */
background-color: #ee6666; /* 赤背景 */
padding: 0.1em 0.2em 0.1em 0.2em;
}
/* チェックボックスになるタグ v2 Font Awesome版 */
.line:not(.cursor-line) ahref='./o':not(.icon) span,
.line:not(.cursor-line) ahref='./v':not(.icon) span {
display: inline-block; width: 0; text-indent: -9999px }
.line:not(.cursor-line) ahref='./o':not(.icon)::after,
.line:not(.cursor-line) ahref='./v':not(.icon)::after {
display: inline-block; min-width: 1.15em; padding-left: 1px;
font-family: FontAwesome; font-size: 120%; text-align: center; vertical-align: middle }
.line:not(.cursor-line) ahref='./o':not(.icon)::after { content: '\f096'; color: #08BDBD }
.line:not(.cursor-line) ahref='./v':not(.icon)::after { content: '\f046'; color: #2489C5 }
/* バッヂ風 */
.line ahref="./MTG",
.line ahref="./IDEA" {
display: inline-block; min-width: 3.2em; border-radius: .2em;
text-align: center; font: bolder 100%/normal Futura, Arial, sans-serif; color: #FFF }
.line ahref="./MTG" { background-color: #08BDBD }
.line ahref="./IDEA" { background-color: #FF9914 }
/* 箇条書きを控えめにする */
.app .line .indent-mark .dot {
height: .1em; width: .5em; border-radius: 25%;
background-color: rgba(173,173,173,.55) }
.app:not(.presentation) .line .indent-mark .dot { top: auto; bottom: 0 }
/* テーブルのセルをわかりやすくする */
.table-block table { background-color: transparent; border-collapse: separate; border-spacing: 2px }
.table-block table tr td { padding: .1em; background-color: rgba(0,0,0,0.04) }
.table-block table tr:nth-child(even) td { background-color: rgba(0,0,0,0.06) } /* 偶数行を濃くする */
.table-block table tr:first-child td { font-weight: bolder; text-align: center } /* 1行目だけ太字&中央揃え */
.table-block table tr td:first-child { padding: 0; background-color: transparent; border-width: 0 }