Edit online

CSS Media Rules

Oxygen PDF Chemistry applies all the element CSS selectors that are:
  • not enclosed in a @media rule.
  • enclosed in a @media rule with type print or oxygen-chemistry.
It is recommended to enclose the rules that use Oxygen extensions in @media oxygen-chemistry, and the ones that apply only to print into a @media print.
chapter {
    margin-left: 2em;
}

@media oxygen-chemistry {
    chapter:before(2) {
        content: counter(chapter);
    }
}

@media print {
    * {
        color:black;
    }
}
Tip: When debugging the results of the applied CSS styling, CSS selectors enclosed in @media print {..} are often not activated by default. There are several ways to activate them. For details, see Debugging the CSS.