
/* don't "grey-out" draft pages in the sidebar */
.chapter li {
    color: var(--sidebar-fg);
}

/* set the cursor for draft pages in the sidebar */
.chapter li div {
    cursor: not-allowed;
}

/* useful for diagrams that should be inverted when using a dark theme */
img.color-adapting-image,
figure.color-adapting-image img {
    filter: invert(calc(85% * var(--is-dark-theme))) hue-rotate(calc(180deg * var(--is-dark-theme)));
}

/* following are for built-in theme classes: mdBook/src/theme/css/variables.css */

/* mdbook dark themes */
.ayu, .coal, .navy {
    --is-dark-theme: 1;
}

/* mdbook light themes */
.light, .rust {
    --is-dark-theme: 0;
}

/* mdbook default no-js dark theme */
@media (prefers-color-scheme: dark) {
    .light.no-js {
        --is-dark-theme: 1;
    }
}
