UserCSS:箇条書きをFontAwesomeにする(軽量版)
A
B
C
D
E
F
G
1. A
2. B
3. C
4. D
5. E
6. F
7. G
3色で繰り返す版
フォントの大きさは一定
色を順番に繰り返す場合は3色で十分だと思う
配色のバランスもとりやすい
色数が多いとバランス調整が大変である
CSS変数定義
カラーセット 1
code:stylexx.css
:root {
}
カラーセット 2
code:stylexx.css
:root {
}
カラーセット 3
code:style.css
:root {
--li-color-1: hsla(288,100%,40%,0.6);
--li-color-2: hsla(216,100%,40%,0.6);
--li-color-3: hsla(144,100%,40%,0.6);
}
code:style.css
:root {
/* 番号なしリストのキャラクター */
--ul-bullet: '\f00c'; /* チェックマーク */
/* --ul-bullet: '\f068'; /* マイナス記号 */
/* --ul-bullet: '\f10c'; /* xまる */
/* --ul-bullet: '\f111'; /* まる */
/* --ul-bullet: '\f0c8'; /* 四角 */
/* --ul-bullet: '\f096'; /*x 四角 */
/* --ul-bullet: '\f580'; /* */
/* --ul-bullet: '\f140'; /* 二重丸*/
/* --ul-bullet: '\f005'; /* スター:クリスマス用 */
/* --ul-bullet: '\f1b2'; /* box */
/* --ul-bullet: '\f599'; /* 顔 */
/* --ul-bullet: '\f1b0'; /* 肉球:猫の日用 */
/* --ul-bullet: '\f6be'; /* ネコ */
/* --ul-bullet: '\f6d3'; /* イヌ */
/* --ul-bullet: '\f1dd'; /* パラグラフ記号 */
/* --ul-bullet: '\f683'; /* 祈り */
/* --ul-bullet: '\f5d7'; /* 骨 */
/* --ul-bullet: '\f004'; /* ハートマーク */
/* 番号つきリストのキャラクター */
/* --ol-bullet: '\f111'; /* 丸 */
/* --ol-bullet: '\f292'; /* ハッシュ記号 '#' */
--ol-bullet: '\f2dc'; /* 雪:クリスマス用 */
/* --ol-bullet: '\f6be'; /* ネコ */
}
番号なしリスト
code:style.css
.line .indent-mark .dot::before {
display: block;
position: absolute;
right: -5px;
top: -12px;
font-family: 'Font Awesome 5 Free';
/* font-family: FontAwesome; /* old */
font-weight: 900;
font-size: 11px;
content: var(--ul-bullet, '\f068');
}
.line .indent-mark .dot {
background-color: transparent;
}
色の指定
code:style.css
.indent-mark .dot:nth-child(3n)::before {
color: var(--li-color-1);
}
.indent-mark .dot:nth-child(3n+1)::before {
color: var(--li-color-2);
}
.indent-mark .dot:nth-child(3n+2)::before {
color: var(--li-color-3);
}
番号つきリスト
code:style.css
.line.number-list .dot {
display: list-item; /* 表示する */
}
アイコン指定
code:style.css
.line.number-list .dot::before {
font-size: 10px;
content: var(--ol-bullet, '\f292');
}
FontAwesome.icon
UserCSS.icon