| 1 |
section#api-documentation div.highlight pre { |
| 2 |
color: #b30000; |
| 3 |
display: block; /* ensures it's treated as a block */ |
| 4 |
margin-left: auto; /* auto margins center block elements */ |
| 5 |
margin-right: auto; |
| 6 |
width: fit-content; |
| 7 |
} |
| 8 |
body[data-theme="light"] section#api-documentation div.highlight, |
| 9 |
body[data-theme="light"] section#api-documentation div.highlight pre { |
| 10 |
background-color: #f8f8f8; |
| 11 |
} |
| 12 |
|
| 13 |
body[data-theme="dark"] section#api-documentation div.highlight, |
| 14 |
body[data-theme="dark"] section#api-documentation div.highlight pre { |
| 15 |
background-color: #202020; |
| 16 |
} |
| 17 |
|
| 18 |
/* AUTO → system prefers DARK (acts like dark unless user forced light) */ |
| 19 |
@media (prefers-color-scheme: dark) { |
| 20 |
body:not([data-theme="light"]) #api-documentation .highlight, |
| 21 |
body:not([data-theme="light"]) #api-documentation .highlight pre { |
| 22 |
background-color: #202020; |
| 23 |
} |
| 24 |
} |
| 25 |
|
| 26 |
/* AUTO → system prefers LIGHT (acts like light unless user forced dark) */ |
| 27 |
@media (prefers-color-scheme: light) { |
| 28 |
body:not([data-theme="dark"]) #api-documentation .highlight, |
| 29 |
body:not([data-theme="dark"]) #api-documentation .highlight pre { |
| 30 |
background-color: #f8f8f8; |
| 31 |
} |
| 32 |
} |