settings
目次
ページの見た目 settings#6847ffa10000000000da9ce8
記法追加 settings#6847ff810000000000da9ce3
ホームの見た目 settings#6847ffae0000000000da9ceb
---
ページの見た目
/customize/画像の幅を100%25にする
code:style.css
.line .image {
max-width: 100%;
max-height: none;
}
/scrasobox/画像を並べて表示
code:style.css
/* マトリクス記法 */
.line:not(.cursor-line) .deco-\| { display: inline-flex }
.line .deco-\| img.image { object-fit: contain; margin: 0 }
/* 太字記法と組み合わせて列数を変える */
.line class^="level" .deco-\| { flex-wrap: wrap }
.line .level-1 .deco-\| > span { width: calc(100%/1) }
.line .level-2 .deco-\| > span { width: calc(100%/2) }
.line .level-3 .deco-\| > span { width: calc(100%/3) }
.line .level-4 .deco-\| > span { width: calc(100%/4) }
.line .level-5 .deco-\| > span { width: calc(100%/5) }
.line class^="level" .deco-\| img.image { object-fit: cover; width: 100%; height: 100% }
/* 並べた画像の間にスキマが欲しい場合はこの2行を追加・ぴっちり敷き詰めたい場合はこの2行は不要 */
.line .deco-\| > span, .line class^="level" .deco-\| > span { overflow: hidden }
.line .deco-\| img.image, .line class^="level" .deco-\| img.image { margin: .2em }
記法追加
警告記法
from /customize/警告記法
code:style.css
/* 警告表記を使えるようにする */
.deco-\! {
--warning-text-color: #FFFFFF;
--warning-bg: #FF3838;
--page-link-color: #80c9fe;
--empty-page-link-color: #ffb7b8;
color: var(--warning-text-color);
background-color: var(--warning-bg);
padding: 1px 2px;
border-radius: 1px;
/* 単色の赤色背景に変更 */
background-color: var(--warning-bg);
}
ネタバレ防止記法
https://scrapbox.io/yamato3010/settings から
これは見本です
code:style.css
.deco-\~:not(:hover) {
filter: blur(4px);
}
.cursor-line .deco-\~:not(:hover) {
filter: none;
}
/yozba/行頭に---を入れるだけでセパレーターになるUserCSS
code:style.css
.line:has(span.char-index.c-0data-char="-"):has(span.char-index.c-1data-char="-"):has(span.char-index.c-2data-char="-"){
&{
display: flex;
align-items: center;
text-align: center;
}
&:not(.cursor-line):after{
flex-grow: 1;
content: "";
border-top: 1px solid #afafaf;
}
&:not(.cursor-line){
height:28px;
}
}
.line:not(.cursor-line):has(.c-0data-char="-"):has(.c-1data-char="-"):has(.c-2data-char="-") span.char-index{
&.c-0data-char="-",
&.c-1data-char="-",
&.c-2data-char="-"{
display:none;
}
}
---
ホームの見た目
カードデザイン
/customize/ピン留めされたページを独立した段に表示する
code:style.css
ul.grid {
& li.page-list-item {
/* ------------------------- */
/* 特殊ページ */
/* ------------------------- */
/* タグに応じたCSS */
&data-page-links~="'教科書'" {
.header {
display: none;
}
img {
position: absolute;
object-fit: contain;
height: 100%;
inset: 0;
border-radius: 4px;
}
}
}
}
/* ピンされたページの次の非ピンページの配置調整 */
.page-list-item.pin + .page-list-item:not(.pin) {
grid-column-start: 1;
}
ハッシュタグの見た目をよくする
code:style.css
atype="hashTag" {
color: var(--assort-color);
background-color: var(--main-color);
padding: 4px 6px;
border: 1px solid currentColor;
border-radius: 4px;
font-size: 0.9em;
}