/
githubmirror
/
LeetCode-Go
Обзор
Документация
Войти
/
githubmirror
/
LeetCode-Go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
website/themes/book/assets/plugins/_numbered.scss
36 строк
675 B
YDZ
change hugo config
02 авг 2020, 16:55
02 авг 2020, 16:55
2369f80
Код
Авторство
О чём код?
$startLevel: 1; $endLevel: 6; .book-page .markdown { @for $currentLevel from $startLevel through $endLevel { > h#{$currentLevel} { counter-increment: h#{$currentLevel}; counter-reset: h#{$currentLevel + 1}; $content: ""; @for $n from $startLevel through $currentLevel { $content: $content + 'counter(h#{$n})"."'; } &::before { content: unquote($content) " "; } } } } .book-toc nav ul { li { counter-increment: item; &:first-child { counter-reset: item; } &:before { content: counters(item, ".") ". "; float: left; margin-inline-end: $padding-4; } } }