-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tooling): partial fix for firefox numbering (#1238)
- Loading branch information
1 parent
1a7c4c7
commit d52fe97
Showing
3 changed files
with
59 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
$startLevel: 1; | ||
$endLevel: 6; | ||
|
||
.book-page .markdown { | ||
counter-reset: h1 h2 h3 h4 h5 h6; | ||
} | ||
|
||
.book-page .markdown { | ||
@for $currentLevel from $startLevel through $endLevel { | ||
h#{$currentLevel} { | ||
counter-reset: h#{$currentLevel + 1} 0; | ||
counter-increment: h#{$currentLevel}; | ||
} | ||
$content: ''; | ||
@for $n from $startLevel through $currentLevel { | ||
$content: $content + 'counter(h#{$n})"."'; | ||
} | ||
|
||
h#{$currentLevel}::before { | ||
content: unquote($content) ' '; | ||
} | ||
} | ||
.book-page .markdown h1 { | ||
counter-reset: h2 0; | ||
counter-increment: h1; | ||
} | ||
|
||
.book-menu nav ol { | ||
li { | ||
counter-increment: item; | ||
|
||
&:first-child { | ||
counter-reset: item; | ||
} | ||
|
||
a:before { | ||
content: counters(item, '.') ' '; | ||
float: left; | ||
margin-inline-end: $padding-4; | ||
color: var(--gray-600); | ||
} | ||
&.active { | ||
&::before { | ||
content: '⨎'; | ||
color: var(--cl-blue); | ||
} | ||
> a::before { | ||
color: var(--cl-blue); | ||
} | ||
} | ||
} | ||
.book-page .markdown h1::before { | ||
content: counter(h1) '. '; | ||
margin-right: 4px; | ||
} | ||
.book-page .markdown h2 { | ||
counter-reset: h3 0; | ||
counter-increment: h2; | ||
} | ||
.book-page .markdown h2::before { | ||
content: counter(h1) '.' counter(h2) '.'; | ||
margin-right: 4px; | ||
} | ||
.book-page .markdown h3 { | ||
counter-reset: h4 0; | ||
counter-increment: h3; | ||
} | ||
.book-page .markdown h3::before { | ||
content: counter(h1) '.' counter(h2) '.' counter(h3) '.' ' '; | ||
margin-right: 4px; | ||
} | ||
.book-page .markdown h4 { | ||
counter-reset: h5 0; | ||
counter-increment: h4; | ||
} | ||
.book-page .markdown h4::before { | ||
content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '.' ' '; | ||
margin-right: 4px; | ||
} | ||
.book-page .markdown h5 { | ||
counter-reset: h6 0; | ||
counter-increment: h5; | ||
} | ||
.book-page .markdown h5::before { | ||
content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '.' | ||
counter(h5) '.' ' '; | ||
margin-right: 4px; | ||
} | ||
.book-page .markdown h6 { | ||
counter-reset: h7 0; | ||
counter-increment: h6; | ||
} | ||
.book-page .markdown h6::before { | ||
content: counter(h1) '.' counter(h2) '.' counter(h3) '.' counter(h4) '.' | ||
counter(h5) '.' counter(h6) '.' ' '; | ||
margin-right: 4px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters