2022.2

Table Of Contents
.DESIGN .address-block {
outline: 1px dashed purple;
}
Adding a background pattern
ThePostcardtemplatewizard(intheBasicPrinttemplatesgroup)usesthe.DESIGNclasstomark
areasthatarereservedforpostaluseandshouldnotcontaintextorimages.Theseareaswereadded
totheMasterPageasabsolutepositionedboxesthathavebeengiventheclassclearzone.Thefol-
lowingstyleruleassignsabackgroundpatterntoelementswiththatclassintheDesignview:
.DESIGN .clearzone {
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAFUlEQVQImWNgQAL/70z7TyqHgYEBANRfDcEzmlBaAAAAAElFTkSuQmCC)
repeat;
}
Note: Thepatternimagewascreatedonwww.patternify.comandisaddedasadataURI(see
DataURIs).
Showing hidden Foundation elements
InCaptureOnTheGotemplatesbasedontheFoundationframeworkthe.DESIGNselectorcanbeused
toshowelementsthatwouldotherwisebehiddenintheDesignview.
Forexample,toexpandaccordionelementsandshowvalidationerrorsinDesignview,youcouldadd
thefollowingstylerulestoyourtemplate:
.DESIGN .accordion .accordion-navigation > .content {
display: block;
}
.DESIGN small.error {
display: block;
margin-top: -20px;
}
Loading a snippet via a script
Itispossible,andoftenveryuseful,toloadasnippetdynamically.
Createascript(see"Writingyourownscripts"onpage368).Inthecodeusethefollowingfunction:
l
ForanHTMLsnippet:loadhtml(‘snippets/nameofthesnippet.html’).
Toinsertthesnippetinthecontentatanypositionwherethescript'sselectorisencountered,
writeresults.loadhtml('snippets/nameofthesnippet.html').
MakesurethatthefilenameisexactlythesameasthefileintheSnippetsfolder.Ifthefilename
Page 390