Skip to content

[Bug] Print styles being ignored #9730

@cjlotz

Description

@cjlotz

Describe the bug
Custom styles created for printing does not seem to get applied. I'm trying to change the background-color of the code blocks as the background color used for web output does not match the printed output. I've added the following CSS to my custom main.css file

@media print {
    section[role="tabpanel"] {
        display: block !important;
    }

    .hljs {
        background-color: aliceblue;
    }
}

The section[role] gets applied, but the background-color overide does not get applied. I've verified that the .hljs override does work when applied to the whole site and not only to print media selector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pdfProduce PDF as the output format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions