2019.2

Table Of Contents
Master Page selector
The Designer writes the name of each Master Page to the masterpage attribute of the <html>
element. This attribute can be used in selectors.
Example
This rule adds a box to the body of every Master Page.
[masterpage] body
results.html('<div
style="background:red;width:1in;height:2in">Hello World</div>');
The following rule adds the box only to the Master Page called "Master Page 1".
[masterpage="Master page 1"] body
results.html('<div
style="background:red;width:1in;height:2in">Hello World</div>');
Sheet position selectors
In Print output, pages have a sheet position that depends on the options set in the "Sheet
Configuration dialog" on page994 (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).
Formatting Master Page objects depending on the sheet position
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.
Page 881