2019.1

Table Of Contents
Note
To make scripts run exclusively on certain sections, it is advised to put them in folders
and set the execution scope of the scripts in a folder via the folder properties; see
"Execution scope" on page805.
Sheet position selectors
In Print output, pages have a sheet position that depends on the options set in the Sheet
Configuration dialog (e.g. the Duplex and Allow Content On options). Connect gives each page
- or rather, the "MediaBox" div element on that page - a class depending on their sheet position:
l .frontside
l .backside (does not apply to simplex documents)
l .contentpage
l .nocontentpage
The MediaBox contains the Master Page objects and section backgrounds. This means that
these classes can only be used to format a Master Page and section background. They do not
let you change the formatting of elements residing in the main text flow (e.g. a <h1> element on
page 3).
Conditionally formatting Master Page objects
The following CSS rule sets the color of <h1> elements on a Master Page when that Master
Page is present on the front of a sheet.
.frontside h1 {
color: green;
}
The next style rule is a bit more specific: it colors <h1> elements on a Master Page when that
Master Page is applied to the front of a sheet in Section 1:
[section='Section 1'] .frontside h1 {
color: green;
}
Page 824