Skip to content

Commit 0fa1df3

Browse files
authored
Update extra.css
1 parent 778ec6f commit 0fa1df3

1 file changed

Lines changed: 92 additions & 5 deletions

File tree

‎stylesheets/extra.css‎

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,94 @@
1+
/* ------------------------------------------------------------------ */
2+
/* Impression : page unique "print" -> Ctrl+P -> Enregistrer en PDF */
3+
/* ------------------------------------------------------------------ */
4+
15
@media print {
2-
.md-sidebar--primary, .md-sidebar--secondary, .md-header,
3-
.md-tabs, .md-footer, .md-top { display: none; }
4-
.md-content { max-width: 100% !important; }
5-
article { break-before: page; } /* chaque section démarre sur une nouvelle page */
6-
.md-typeset { font-size: 11pt; }
6+
/* Hide interactive / on-screen chrome */
7+
.md-sidebar--primary,
8+
.md-sidebar--secondary,
9+
.md-header,
10+
.md-tabs,
11+
.md-footer,
12+
.md-top,
13+
.md-content__button,
14+
.md-nav__link[data-md-state="blur"] {
15+
display: none !important;
16+
}
17+
18+
/* Full width, no sidebar margins */
19+
.md-grid {
20+
max-width: 100% !important;
21+
}
22+
.md-content {
23+
max-width: 100% !important;
24+
margin-inline: 0 !important;
25+
}
26+
.md-content__inner {
27+
padding-inline: 0 !important;
28+
}
29+
.md-typeset {
30+
font-size: 11pt;
31+
max-width: 100% !important;
32+
}
33+
34+
/* Dark-mode palette to white background, black text */
35+
html[data-md-color-scheme="slate"] {
36+
--md-default-bg-color: #ffffff;
37+
--md-typeset-a-color: #1a5fb4;
38+
}
39+
.md-typeset,
40+
.md-typeset p,
41+
.md-typeset li {
42+
color: #000000 !important;
43+
}
44+
.md-typeset a {
45+
color: #1a5fb4 !important;
46+
}
47+
48+
/* Webkits: images and code blocks must not overflow the page */
49+
.md-typeset img,
50+
.md-typeset video {
51+
max-width: 100% !important;
52+
page-break-inside: avoid;
53+
}
54+
.md-typeset pre,
55+
.md-typeset code {
56+
white-space: pre-wrap !important;
57+
word-break: break-word;
58+
}
59+
.md-typeset pre > code {
60+
white-space: pre-wrap !important;
61+
}
62+
63+
/* Clean page breaks */
64+
h1, h2, h3 {
65+
break-after: avoid;
66+
page-break-after: avoid;
67+
}
68+
h1, h2, h3, h4, h5, h6 {
69+
break-inside: avoid;
70+
page-break-inside: avoid;
71+
}
72+
table, figure, blockquote, ol, ul {
73+
break-inside: avoid;
74+
}
75+
table {
76+
width: 100% !important;
77+
font-size: 10pt;
78+
}
79+
img {
80+
break-inside: print-doc;
81+
}
82+
83+
/* Force dark-mode colors on code blocks */
84+
.md-typeset pre {
85+
background: #f5f5f5 !important;
86+
color: #000 !important;
87+
border: 1px solid #ddd;
88+
}
89+
90+
/* Re-enable the TOC line numbers/header rules if used */
91+
.md-typeset .md-nav__list {
92+
display: block;
93+
}
794
}

0 commit comments

Comments
 (0)