Skip to content

Commit

Permalink
[numérotation] Correction des soucis d'espacement.
Browse files Browse the repository at this point in the history
- On ne s'appuie plus sur des espaces dans le contenu, mais sur une marge à la
  taille relative à la largeur d'une lettre de la police courante.
- Les compteurs sont réinitialisés en une ligne (plus clair, inutile de
  s’embêter).
  • Loading branch information
AmauryCarrade committed Jun 24, 2024
1 parent 316f604 commit edf7b35
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions assets/scss/layout/_content.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
body:before {
counter-reset: part chapter section subsection;
}

.article-content {
h2, h3, h4, h5 {
&:before {
margin-inline-end: .4ex;
}
}

h2 {
counter-increment: part;
counter-set: chapter;

&:before {
content: counter(part) ".";
}
}

h3 {
counter-increment: chapter;
counter-set: section;

&:before {
content: counter(part) "." counter(chapter) ".";
}
}

h4 {
counter-increment: section;
counter-set: subsection;

&:before {
content: counter(part) "." counter(chapter) "." counter(section);
}
}

h5 {
counter-increment: subsection;

&:before {
content: counter(part) "." counter(chapter) "." counter(section) "." counter(subsection) ".";
}
}
}

.small-content-wrapper {
width: 90%;
max-width: $length-512;
Expand Down

0 comments on commit edf7b35

Please sign in to comment.