Hi all,
I´m not sure: Do I realy need this body section also in the @media print section?
@media print
{
/* Globale Einstellungen */
body /* Print */
{
font-family: 'Roboto Regular', 'Segoe UI', 'sans-serif';
mc-hyphenate: never;
font-style: normal;
font-variant: normal;
font-weight: normal;
text-decoration: none;
text-transform: none;
text-align: left;
margin-left: 0pt;
margin-right: 0pt;
orphans: 3;
widows: 3;
page-break-inside: auto;
}
/* Überschriften */
h1 /* Print */
{
font-family: 'Roboto Regular';
font-size: 17pt;
line-height: 21pt;
page-break-after: avoid;
page-break-before: always;
margin-top: 0pt;
margin-bottom: 9pt;
mc-heading-level: 1;
mc-auto-number-format: 'CH:{chapnum} ';
mc-auto-number-offset: 45pt;
mc-multiline-indent: 20 pt;
mc-auto-number-position: inside-head;
color: var(--Black);
}
Body definition in media Print
-
robdocsmith
- Sr. Propeller Head
- Posts: 271
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Body definition in media Print
Hi,
It depends on what the rest of your stylesheet says and what changes you might want to make to your styles for Body in Print documents. From the two styles listed, there is some duplication which isn't necessary. Body is the parent of H1 so there is no need to duplicate a style in H1, only need to list any changes.
For example, in my overall Body style, I set parameters for HTML help versions of my documents. Then in my Body for Print documents I set a global style for the font face and size for my print documents (because it is different to the online ones). Then in my Print H1 I change the size to a more suitable heading size. I don't need to set the font face for H1 because it is already set in the Body. The styles cascade down from parent to child and you only need to redefine in a child if they need to be different.
Cheers,
Rob
It depends on what the rest of your stylesheet says and what changes you might want to make to your styles for Body in Print documents. From the two styles listed, there is some duplication which isn't necessary. Body is the parent of H1 so there is no need to duplicate a style in H1, only need to list any changes.
For example, in my overall Body style, I set parameters for HTML help versions of my documents. Then in my Body for Print documents I set a global style for the font face and size for my print documents (because it is different to the online ones). Then in my Print H1 I change the size to a more suitable heading size. I don't need to set the font face for H1 because it is already set in the Body. The styles cascade down from parent to child and you only need to redefine in a child if they need to be different.
Cheers,
Rob