Styles are elements that contain formatting settings. You can apply styles to your content to change the way it looks. Flare works with cascading style sheet (CSS) rules that are specified by the World Wide Web Consortium, or W3C (http://www.w3.org).
example
The heading above is using the <
An important aspect of CSS is that it is based on community-wide standards set by the W3C. This means that CSS can be used for any XML-based tool, not just Flare. Tools such as Microsoft Word and Adobe FrameMaker also use styles, but they are proprietary, which means they can be used only within that application.
The vast majority of the styles and style properties in Flare were developed by the World Wide Web Consortium (W3C). For more thorough information about each W3C style and property, refer to http://www.w3.org and use the search feature on the website.
Another way to discover the meaning of a specific property is by using the Flare interface. When you select a property in the Stylesheet Editor, a short description of the property is displayed at the bottom of the editor.
The following resources are highly recommended for learning more about CSS.
Online School
Cascading Style Sheets: Designing for the Web by Hakon Wium Lie and Bert Bos
HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide) by Elizabeth Castro
CSS: The Definitive Guide by Eric Meyer
In addition to the many standard styles from W3C, you might notice several unique-looking styles that begin with the word "MadCap" (e.g., MadCap|footnote, MadCap|toggler). There are also many MadCap-specific properties. You will recognize these properties because they always start with "mc" (e.g., mc-footnote-format, mc-hyphenate).
CSS is a lot more than simply a method for changing the look of text in your documentation. It can certainly be used to modify text in all kinds of ways (e.g., size, font type, color), but it can do a whole lot more, including changing the presentation and behavior of the following elements:
One of the best ways to truly appreciate the power of CSS is to visit http://www.csszengarden.com. This website contains text and links that let you apply different CSS files to the content. Each time you select a different CSS file, the look and feel of the page changes dramatically.
In order to truly understand CSS, you need to understand how different parts of an XML-based document relate to corresponding style elements.
As the following image shows, HTML and XHTML documents have certain style elements, usually with opening and closing tags (e.g., <HTML> and </HTML>).
Following are the three main ways to use CSS rules.
Inline CSS
With this method, you specify the formatting rule for the content at the spot where it exists in the document. Although this type of implementation is allowed, it is not recommended because changing the look of the text in the future might mean making changes in many files and many places instead of just one.
Embedded CSS
With this method, you specify formatting rules for elements within a file and they affect only that document.
example
You might decide to specify that every paragraph in the document should be 11 points. Therefore, in the XHTML document code, you specify between the <head> tags that all paragraphs (<p> tags) should be that size. As a result, every time a <p> tag is found in that document, the text will be 11 points. In the behind-the-scenes XHTML code, it might look like this:
This method is a bit more powerful than the inline method, but it still does not allow you to control the look and feel of more than one document at a time, therefore it also is not recommended.
If you want to use embedded CSS in Flare, you would need to open the XHTML code (in the Internal Text Editor or in a third-party editor) and enter the embedded CSS rules manually.
External CSS
With this method, you DO NOT specify formatting rules anywhere within the XHTML or HTML document. Instead, you specify the rules in a separate, external file that has a .css extension (see Creating New Style Sheets and Editing Styles). Then, in the XHTML document you provide a link to that external style sheet (see Applying Master Style Sheets and Applying Style Sheets to Topics).
example
You might decide to specify that every paragraph in all of your documents should be 11 points. Therefore, you create an external style sheet, name it something like styles.css, and specify within it that all paragraphs (<p> tags) should be that size. This work can be done in the Flare interface. If you look at the behind-the-scenes code in the CSS file, it might look like this:
Then you associate the external style sheet with all of the XHTML files that you want to use that look and feel. Again, this can be done in the Flare project at multiple levels (topic, target, and project). If you look in the behind-the-scenes XHTML code of one of the document files, it might look like this:
External style sheets are recommended over the other methods. They make it possible to truly separate the content from the presentation and allow you to apply formatting to multiple places at once.
Best Practice: Style sheets are the best way to control the look of your content. See Best Practice—Using External Style Sheets Instead of Local Formatting .
Because there are multiple ways to implement CSS (inline, embedded, external), what happens if there is a conflict? For example, what if you use the inline method to set paragraphs to green, but then you use the external CSS method to set paragraphs to blue? "Cascading" is the concept that is used to decide which method "wins" when such a conflict occurs. It's all about order of precedence. Inline has precedence over embedded styles, and embedded styles have precedence over external style sheets.
So if you make changes in an external style sheet and notice that the look is not being changed, you might check to see if an inline or embedded style setting is overriding it.
Flare lets you
Topic style sheets This type of style sheet lets you store styles for general content in your project. You can have as many styles as you want within one topic style sheet
Note: If you would like to access the same style sheet that is used for the Flare documentation, you can download it from this location:
http://www.madcapsoftware.com/documentation/Styles/styles.css
After downloading this file, it opens in Notepad. You can then select File>Save As in Notepad and save the style sheet to any location you want. For example, if you already have a project where you want to use it, you can navigate to the folder where that project is stored in Windows and save the style sheet in the Content\Resources\Stylesheets subfolder.
Note: You cannot use multiple style sheets per topic for native Adobe PDF, Microsoft XPS, and XHTML outputs.
Table style sheets This type of style sheet lets you create a unique look for tables that you insert
example
You might use two different types of tables in your project—a "basic" one (with simple borders and no shading) and a "fancy" one (with customized borders and colored shading in certain rows and columns). So you create one table style sheet (let's say it's called "basic.css") and format it the way you want, and then you create a second table style sheet (let's say it's called "fancy.css") and format it. Then, as you insert tables into your topics, you can associate the new table with one of these two table style sheets.
Note: Even though you can create a table style sheet to affect the look of your tables, alternatively you can use a topic style sheet to modify standard CSS table tags (e.g., <th>, <td>) that are used to dictate the look of different parts of a table (e.g., heading text, table cell text).
Note: If you are importing Adobe FrameMaker documents and have tables that you have formatted in a certain way, you can create matching table styles as a result of the import. This can be specified on the Options page of the Import FrameMaker Wizard. In the Flare project, the new table styles will be named after the format named applied to the table in FrameMaker (e.g., "Format_A.css," "Format_B.css," and so on). You can rename these table style sheets in Flare after the import. Even if you do not use this mapping feature, the table formatting still comes across when you import the files. The only difference is that table style sheets make it easier to maintain the formatting of your tables within Flare.
When you want to use styles in your content, the style sheet needs to be made available for the content in question. In Flare, you can associate style sheets with a single topic
See Applying Master Style Sheets.
Best Practice: Using master style sheets is recommended over applying style sheets to individual topics. See Best Practice—Use Master Style Sheets.
Note: If you apply a master style sheet at either the target or project level, you will no longer be able to associate style sheets at the topic level (unless you remove the master style sheet associations at the project and/or target level). If you have previously applied multiple style sheets to a single topic and then switch to using a master style sheet, you should make sure that all of the styles you need from the various style sheets are all included in your master style sheet.
When you open a topic style sheet, it is displayed in the Stylesheet Editor. When you open a table style sheet, it is displayed in the Table Style Editor.
The Stylesheet Editor allows you to use either an "Advanced" view or a "Simplified" view when working with topic styles.
The Table Style Editor contains multiple tabs and fields for specifying settings such as patterns, borders, backgrounds, alignment, and margins.
Although Flare provides you with a user interface to work on styles, you can get behind the scenes to see and edit the code for the style sheet. One way to do this is to open the style sheet in Flare. Then click the Send To button
in the Standard toolbar and select Notepad. If you make changes in that file, those edits are displayed in the Flare Stylesheet Editor when you save the file in Notepad.
When working with styles, there are some unique terms that you will encounter, especially in topic style sheets.
In the Stylesheet Editor, you will notice several elements in the Styles section that already exist for your use. These are called "tags." You also might hear them referred to simply as "styles" or as "selectors." A tag is an element to which you assign a look and feel. You can then apply that style to your content, so that the content takes on the look and feel associated with the style. Different kinds of tags are available in a style sheet, to be used for various purposes in your content.
example
<p> is a tag, which can be used to affect the look of paragraphs in your content. Another tag is <h2>, which can be used to affect the look of second-level headings in your content. Yet another tag is <span>, which can be used to affect the look of character-level content (e.g., a portion of a paragraph, but not the entire paragraph).
Note: Complex selectors are called "descendant selectors" in CSS. For more information, see w3.org.
You can think of tags as parent styles, because they can have children. A child of a tag is called a "class." Some of these classes might already be included in your style sheet
Note: Although you can create new style classes, you cannot create new parent tags.
When you create a class, it automatically takes on all of the same qualities (or "attributes") from the parent tag (e.g., color, alignment, size). However, you can change some of those attributes for the class as necessary so that it is different from the parent tag in some ways.
example
Let's say you want to create a special look for paragraph notes in order to provide additional information in a topic. In addition, you might want yet another special kind of paragraph to be used for tips. Perhaps you want a blue background for your note paragraphs, and you want a yellow background for your tip paragraphs. Meanwhile, for your regular paragraphs, you do not want any colored background.
Therefore, you could create a class of your parent <p> tag and name it "Note." Then you might create another class of your <p> tag and name it "Tip." For the Note class, you could change the background property to display in blue, and you could change the same property for the Tip class to display in yellow. But you would leave the background property for the parent <p> tag as it is, without a color. In the end, both the Note and Tip classes would take on all of the style settings from its parent tag—<p>—with the exception of the background color that you have specified for each.
How can you distinguish between parent tags and style classes? In the Simplified view of the Stylesheet Editor, style classes are listed after the parent tags, and a period is added between the name of the parent tag and the name of the class (e.g., p.Tip).
In the Advanced view of the Stylesheet editor, parent tags and style classes are shown in a tree view. You can click the plus button
next to a parent tag to see its style classes.
Every tag and style class has certain attributes that contribute to its look and feel. The elements used to control these attributes are known as "properties," which can be organized into property groups (in the Advanced view of the Stylesheet Editor). The precise information within a property is known as a "value."
example
Returning to the example of a note for a paragraph tag (p.Note), let's say we want the background to be blue. That particular quality can be controlled in a property called "background-color." In the Advanced view of the Stylesheet Editor, this property can be found in the property group named "Background." For our p.Note style, we would assign a value of "blue" to that property.
There are hundreds of basic properties that you can use to change various aspects of a style.
example
Let's say that you plan to create several bulleted lists in your topics, and you want to be able to change the look of bullet items using a style. Perhaps you want to do this for bullet items that are indented to the second level in a list (i.e., they are sub-bullets of first-level items in the list). Suppose you want those bullet items to be displayed in a blue, 10-point Verdana font. Like this:
In order to do this, you might first select the <li> tag in the Stylesheet Editor and create a class for it named "Indented2" (li.Indented2). Then you could select this class, open the Font property group, and change the "color," "font-family," and "font-size" properties.
Therefore, in a situation such as this, you would have set the following in the Stylesheet Editor:
Style class: li.Indented2
Property: color (value=blue)
Property: font-family (value=Verdana)
Property: font-size (value=10 pt)
Here is how it would look when you are finished (in the Simplified view of the style sheet).
Here is how it would look when you are finished (in the Advanced view of the style sheet).
In addition to the many standard styles from W3C, you might notice several unique-looking styles that begin with the word "MadCap" (e.g., MadCap|footnote, MadCap|toggler). There are also many MadCap-specific properties. You will recognize these properties because they always start with "mc" (e.g., mc-footnote-format, mc-hyphenate).
These special styles and properties have been added to the Flare user interface in order to support some of the unique features available only in MadCap Software products.
Following is a list of MadCap-specific styles.
| Style | Description | See These Topics |
|---|---|---|
|
MadCap|annotation |
Modifies the look of content in a topic to which an annotation (i.e., internal topic comment) points. For example, you might want annotated text to be displayed in the XML Editor with red font and a yellow background. This does not change the text as it will be shown in the output, but rather only as it is displayed in the XML Editor. |
|
|
MadCap|bodyProxy |
Modifies the look of the "container" holding topic content. For example, you might edit this style to add a border around all topic content. |
|
|
MadCap|breadcrumbsProxy |
Modifies the look of breadcrumbs in online output. |
|
|
MadCap|concept |
Modifies the look of concepts that have been inserted in the XML Editor (when markers are turned on). This does not affect the output. |
|
|
MadCap|conceptLink |
Modifies the look (e.g., font, color, wording) of a concept (See Also) link heading. When you do this, the style changes for all concept links in any topics in your project. |
|
|
MadCap|conceptLink ControlList |
Modifies the look of the entire list (<ul> element) when concept links are displayed in a list, rather than in a popup. |
|
|
MadCap|conceptLink ControlListItem |
Modifies the look of individual items in the list (<li> elements) when concept links are displayed in a list, rather than in a popup. |
|
|
MadCap|conceptLink ControlListItemLink |
Modifies the look of links in the list (<a> elements) when concept links are displayed in a list, rather than in a popup. |
|
|
MadCap|conceptsProxy |
Modifies the look of the "container" holding a generated list of concepts. |
|
|
MadCap|conditionalText |
Modifies the look of content in the XML Editor that has a condition tag applied to it. For example, you might want conditionalized content to stand out with a larger font so you can easily spot it while editing content. This does not affect the output. |
|
|
MadCap|dropdown |
Modifies the entire container holding a drop-down effect, including the image that is shown when a drop-down effect is open or closed. |
|
|
MadCap|dropDownBody |
Modifies the content that is shown when users open a drop-down effect. |
|
|
MadCap|dropDownHead |
Modifies the text in the first paragraph of a drop-down effect (i.e., the paragraph where the drop-down link is located). |
|
|
MadCap|dropDownHotspot |
Modifies the specific text that you select in the first paragraph of a drop-down effect to serve as the link for opening the drop-down body. If you do not select specific text in the first paragraph to serve as the hotspot, the entire first paragraph is used as the hotspot. |
|
|
MadCap|endnoteBlock |
Modifies the container (or block) holding individual endnote comments. For example, if you want to add a border around each endnote comment created from an endnotes proxy, you would use this style. |
|
|
MadCap|endnotesBlock |
Modifies the container (or block) holding all endnote comments. For example, if you want to add a border around the collection of all endnote comments created from an endnotes proxy, you would use this style. |
|
|
MadCap|equation |
Modifies the appearance of all equations. |
|
|
MadCap|expanding |
Modifies the entire container holding an expanding text effect, including the image that is shown when an expanding text effect is open or closed. |
|
|
MadCap|expandingBody |
Modifies the expanded text portion of an expanding text effect (i.e., the area that is displayed or hidden when users click the hotspot link). |
|
|
MadCap|expandingHead |
Modifies the hotspot portion of an expanding text effect. |
|
|
MadCap|footnote |
Modifies both the footnote number (or symbol) where it is inserted in the topic, as well as the number and accompanying comment text (at the bottom of the page, or wherever else you specify its location). |
|
|
MadCap|footnoteBlock |
Modifies the container (or block) holding individual footnote comments. For example, if you want to add a border around each footnote comment on a page, you would use this style. |
|
|
MadCap|footnotesBlock |
Modifies the container (or block) holding all footnote comments. For example, if you want to add a border around the collection of all footnote comments on a page, you would use this style. |
|
|
MadCap|glossaryProxy |
Modifies the look of the "container" holding a generated glossary. |
|
|
MadCap|glossaryTerm |
Modifies the look of glossary term links. |
|
|
MadCap|helpControlList |
Modifies the look of the entire list (<ul> element) when Help control links are displayed in a list, rather than in a popup. This is a general style that controls all three types of Help control links—concept, keyword, and related topics. Alternatively, you can set properties on each specific style—MadCap|conceptLinkControlList, MadCap|keywordLinkControlList, or MadCap|relatedTopicsControlList. |
|
|
MadCap|helpControl ListItem |
Modifies the look of individual items in the list (<li> elements) when Help control links are displayed in a list, rather than in a popup. This is a general style that controls all three types of Help control links—concept, keyword, and related topics. Alternatively, you can set properties on each specific style—MadCap|conceptLinkControlListItem, MadCap|keywordLinkControlListItem, or MadCap|relatedTopicsControlListItem. |
|
|
MadCap|helpControl ListItemLink |
Modifies the look of links in the list (<a> elements) when Help control links are displayed in a list, rather than in a popup. This is a general style that controls all three types of Help control links—concept, keyword, and related topics. Alternatively, you can set properties on each specific style—MadCap|conceptLinkControlListItemLink, MadCap|keywordLinkControlListItemLink, or MadCap|relatedTopicsControlListItemLink. |
|
|
MadCap|helpControl Menu |
Modifies the look of links (i.e., menu items) that users see when they click a concept link, keyword link, or related topics control. This style is grouped with the "Dynamic Effects Styles" (which you can select from the drop-down list in the upper-left corner of the Stylesheet Editor). This particular style controls the entire list when you are using the popup menu method for displaying Help control links. |
|
|
MadCap|helpControl MenuItem |
Modifies the look of links (i.e., menu items) that users see when they click a concept link, keyword link, or related topics control. This style is grouped with the "Dynamic Effects Styles" (which you can select from the drop-down list in the upper-left corner of the Stylesheet Editor). This particular style controls the individual list items when you are using the popup menu method for displaying Help control links. |
|
|
MadCap|indexProxy |
Modifies the look of the "container" holding a generated index |
|
|
MadCap|keyword |
Modifies the look of index keywords that have been inserted in the XML Editor (when markers are turned on). This does not affect the output. |
|
|
MadCap|keywordLink |
Modifies the look (e.g., font, color, wording) of a keyword link heading. When you do this, the style changes for all keyword links in any topics in your project. |
|
|
MadCap|keywordLink ControlList |
Modifies the look of the entire list (<ul> element) when keyword links are displayed in a list, rather than in a popup. |
|
|
MadCap|keywordLink ControlListItem |
Modifies the look of individual items in the list (<li> elements) when keyword links are displayed in a list, rather than in a popup. |
|
|
MadCap|keywordLink ControlListItemLink |
Modifies the look of links in the list (<a> elements) when keyword links are displayed in a list, rather than in a popup. |
|
|
MadCap|listOfProxy |
Modifies the look of the "container" holding a generated list of elements. |
|
|
MadCap|miniTocProxy |
Modifies the look of the "container" holding a generated mini-TOC. |
|
|
MadCap|pageFooter |
Modifies the look of the content contained in a page footer used in master pages for Adobe FrameMaker and Microsoft Word output. |
|
|
MadCap|pageHeader |
Modifies the look of the content contained in a page header used in master pages for Adobe FrameMaker and Microsoft Word output. |
|
|
MadCap|popup |
Modifies the look of text popup links that have been inserted in the XML Editor. This does not affect the output. |
|
|
MadCap|popupBody |
Modifies the popup text portion of an popup text effect (i.e., the area that is displayed or hidden when users click the hotspot link). |
|
|
MadCap|popupHead |
Modifies the hotspot portion of a popup text effect. |
|
|
MadCap|qrCode |
Modifies the appearance of all QR codes. |
|
|
MadCap|relatedTopics |
Modifies the look (e.g., font, color, wording) of a related topics link heading. When you do this, the style changes for all related topics links in any topics in your project. |
|
|
MadCap|relatedTopics ControlList |
Modifies the look of the entire list (<ul> element) when related topics are displayed in a list, rather than in a popup. |
|
|
MadCap|relatedTopics ControlListItem |
Modifies the look of individual items in the list (<li> elements) when related topics are displayed in a list, rather than in a popup. |
|
|
MadCap|relatedTopics ControlListItemLink |
Modifies the look of links in the list (<a> elements) when related topics are displayed in a list, rather than in a popup. |
|
|
MadCap|relationships Heading |
Modifies the look of headings used in relationship links. There are three classes of this style that you can edit. If you edit the main MadCap|relationshipsHeading stylee, the look of all of the classes are affected. However, you can also edit the look of each class if you want.
|
|
|
MadCap|relationships Item |
Modifies the look of link items created from a relationships table. |
|
|
MadCap|relationships Proxy |
Modifies the look of the "container" holding the content from a generated relationships table. |
|
|
MadCap|shortcut |
Modifies the look (e.g., font, color) of a Shortcut control link. When you edit the style for a Shortcut control, the style changes for all Shortcut controls in any topics in your project. |
|
|
MadCap|snippetBlock |
Modifies the look of block snippets that have been inserted in the XML Editor. If you insert a snippet on a blank line in a topic, it is inserted as a block snippet (as opposed to a text snippet) and takes up all of the room so that no other content can be added. For example, if you want all of your block snippets to stand out with a blue font—making it easier to identify these snippets as you work—you can use this style. This style does not affect the output. If you want to make changes to a snippet that affect the output, you can open the snippet and modify it in the XML Editor, just as you would edit a regular topic. |
|
|
MadCap|snippetText |
Modifies the look of text snippets that have been inserted in the XML Editor. If you insert a snippet on a line where other content exists, it is inserted as a text snippet, as opposed to a block snippet. For example, if you want all of your block snippets to stand out with a blue font—making it easier to identify these snippets as you work—you can use this style. This style does not affect the output. If you want to make changes to a snippet that affect the output, you can open the snippet and modify it in the XML Editor, just as you would edit a regular topic. |
|
|
MadCap|tocProxy |
Modifies the look of the "container" holding a generated TOC |
|
|
MadCap|toggler |
Modifies the look (e.g., font, color) of a toggler hotspot. When you do this, the style changes for all toggler hotspots in any topics in your project. |
|
|
MadCap|topicToolbar Proxy |
Modifies the look of the "container" holding a generated topic toolbar. The topic toolbar proxy will use whatever settings are specified on the Topic Toolbar tab in the Skin Editor. However, you can override those settings for an individual proxy. |
|
|
MadCap|variable |
Modifies the look of variables that have been inserted in the XML Editor. For example, if you want all of your variables to stand out with a blue font—making it easier to identify them as you work—you can use this style. This style does not affect the output. |
|
|
MadCap|xref |
Modifies the look and format used in cross-references. |
Following is a list of MadCap-specific style properties.
| Property | See These Topics |
|---|---|
|
mc-auto-number-class |
|
|
mc-auto-number-format |
|
|
mc-auto-number-offset |
|
|
mc-auto-number-position |
|
|
mc-breadcrumbs-count |
|
|
mc-breadcrumbs-divider |
|
|
mc-breadcrumbs-prefix |
|
|
mc-closed-image |
|
|
mc-column-count |
|
|
mc-disable-glossary-terms |
|
|
mc-feader-type |
Using Styles to Determine the Page Type for Page Footers and Headers |
|
mc-float |
|
|
mc-footnote-format |
|
|
mc-footnote-number |
|
|
mc-footnote-position |
|
|
mc-format |
|
|
mc-heading-format |
|
|
mc-heading-level |
Creating a Topic for a Print TOC |
|
mc-help-control-display |
Using Styles to Determine the Display for Help Control Links |
|
mc-hyphenate |
|
|
mc-hyphenate-maximum-adjacent-line-count |
|
|
mc-hyphenate-shortest-prefix |
|
|
mc-hyphenate-shortest-suffix |
|
|
mc-hyphenate-shortest-word |
|
|
mc-index-headings |
|
|
mc-label |
|
|
mc-leader-align |
Editing Relationship Link Styles Using Styles to Determine the Look of a List of Concepts Using Styles to Determine the Look of a List of Elements |
|
mc-leader-format |
Editing Relationship Link Styles Using Styles to Determine the Look of a List of Concepts Using Styles to Determine the Look of a List of Elements |
|
mc-leader-offset |
Editing Relationship Link Styles Using Styles to Determine the Look of a List of Concepts Using Styles to Determine the Look of a List of Elements |
|
mc-open-image |
|
|
mc-output-support |
|
|
mc-popup-height |
|
|
mc-popup-width |
|
|
mc-redacted |
|
|
mc-short-line |
|
|
mc-short-line-loosen-end-length |
|
|
mc-short-line-loosen-maximum |
|
|
mc-short-line-method |
|
|
mc-short-line-step |
|
|
mc-short-line-tighten-maximum |
|
|
mc-thumbnail |
|
|
mc-thumbnail-max-height |
|
|
mc-thumbnail-max-width |
|
|
mc-toc-depth |
One of the features of CSS that makes it much more powerful than other style systems is inheritance. This is simply the idea that elements in your document can inherit the style settings from other elements. This occurs when one style element is added within another element, therefore creating a parent-child relationship. The child inherits all of the style settings that the parent has, unless you override those settings on the child element. This can be a very powerful feature because it allows you to set properties on a parent element once rather than setting the same thing on all of its children elements.
example
Let's say you want all of your block-level elements to use Arial as the font type. Rather than setting Arial on all of the various tags (h1, p, div, ul, li), you can set it on the <body> tag. That way, the setting will "trickle down" automatically to all of the child elements.
After some time you might decide that you want to continue using Arial for all of those elements except the <p> tags. In that case, you can simply set the other font type on the <p> style. The rest of the elements will continue to use Arial.
What happens if a value is not set on the <body> tag in the style sheet? In that case, the value is inherited from the element's setting in the end user's browser.
There are several categories of styles that you can apply to content. To filter the list of styles shown, use the drop-down list in the Show Styles section of the Stylesheet Editor.
For steps on applying each type of style to content in your project, see Applying Styles to Topic Content. Following are explanations of the basic types of styles.
Auto-numbered styles These are styles to which an auto-number format has been applied. Therefore, an auto-number format style is not technically a unique type of style, because an auto-number format can actually be applied to other types of styles (such as paragraphs and headings). If you apply an auto-number format to a style, that style will be listed in the Stylesheet Editor if you select Show Auto-numbered Styles.
example
You might select the <h1> style tag and modify its "mc-auto-number-format" property, choosing a format such as {n+}. If you then select Show Auto-numbered Styles in the Stylesheet Editor, the <h1> style will be listed.
See About Auto-Numbers.
You can also use this kind of style to apply different master pages to different topics.
example
You might want most topics in your project to use the same master page (to display the same text at the bottom of each topic). However, maybe you want a select few other topics to use a different master page. For the majority of the topics, you can simply apply the main master page to the target. But for the other topics, you can use a topic style. For example, you can create a class for the <html> tag in your style sheet, naming it "SpecialMasterPage" (i.e., html.SpecialMasterPage). Then you can modify the "mc-master-page" property for that class so that it is associated with the secondary master page. Finally, you can apply the html.SpecialMasterPage style to the topics that you want to be associated with that master page.
How to use multiple master pages by creating topic styles
to save your work.
to turn on the structure bars. In the context menu, select Style Class and choose the style that you want to apply.
Note: You will not see any styles from this list until you create a class for the <html> tag in the Stylesheet Editor.
example
You might select a style class called "p.Body" that you have created and modify its "font-size" property to enlarge the body text in your topics.
example
You might select the <MadCap|footnote> style and modify its "mc-footnote-number" in order to restart the numbering for footnotes at each chapter (as opposed to each book, page, or section). You might select the <MadCap|footnoteBlock> style and modify its "color" property in order to show the footnote text in blue.
See About Footnotes.
Heading styles These are styles that are applied to content intended to serve as headings above sections of content.
example
You might select the <h2> style and modify its "font-family" property in order to display second-level headings in an Arial font.
Character styles These are styles that are applied to selected text within a paragraph, rather than the entire paragraph.
example
You might select the <span> style and create a class under it named "code" (span.code). Then you might set its "font-family" property to "Courier New" in order to display text that represents programming code.
example
You might select the <th> style and modify its "color" property in order to display table header row text in green.
Note: These styles are not to be confused with the separate table style sheets that you can create. However, you can use both table style sheets and these standard table styles from a topic style sheet in order to design the look of your tables and their content.
example
You might select the <li> style and create a class under it named "indented." Then you might set its "margin-left" property to "0.5 in" so that bulleted list items are indented one-half inch from the left edge.
Link styles These are styles that are applied to content that contains a link, such as a cross-reference
example
You might select the <MadCap|xref> style and modify its "mc-format" property to change the text displayed in cross-references (e.g., "see page…").
Image styles These are styles that are applied to images and objects that you inserted into topics.
example
You might create a class under the <img> tag, name it "Thumbnail" (img.Thumbnail), and modify its "mc-thumbnail" property. This lets you specify that pictures using that tag should be shown as small thumbnails until the end user either clicks or hovers over the thumbnail to see the large version.
Dynamic effects styles These are styles that are applied to content used in Dynamic HTML effects, such as drop-down text or popups.
example
You might select the <MadCap|dropDown> style and modify its "mc-open-image" and "mc-closed-image" properties in order to change or remove the image, such as an arrow, displayed next to drop-down effects.
Reusable content styles These are styles that are applied to reusable content, such as snippets, variables, or proxies.
example
Generated content styles These are styles that are applied to content that is created when you generate output, such as glossaries, indexes, or tables of contents (TOCs).
example
You might select the "TOC1" class under the <p> tag (p.TOC1) and modify its "mc-leader-format" property. This lets you set the leader format, such as dots, to be displayed after the first-level headings in the generated TOC
Controls/form styles These are styles that are applied to content within controls, such as buttons, or forms.
example
You might select the <form> style tag and modify its "text-align" property in order to center a form that you add in a topic.
Pseudo classes are a special group of style classes in cascading style sheets that pertain to elements when they're in a certain state. They are most often used for styles associated with hyperlinks.
Link pseudo classes include the following:
example
Let's say you want the text to display in green for links that have not yet been clicked. But after a link is clicked, you want it to display as gray text. Therefore, under the <a> style tag, you modify the "link" pseudo class and change the font color to green. Then you modify the "visited" pseudo class under the <a> tag so that the font color is gray.
There are a couple of additional kinds of pseudo classes that you can create from the Stylesheet Editor. These are called "first-letter" and "first-child" pseudo classes.
The first-letter class lets you apply style settings to the first letter in a block (such as a paragraph), if it is not preceded by any other content (such as an image). This pseudo class is useful for creating drop caps and initial caps effects. See Creating Initial Caps Effects
The first-child class lets you apply style settings to the first child of another element (e.g., the first <p> tag that occurs within a <div> tag).
What if you want to use certain style settings for some
A medium is an alternative set of styles in a style sheet that you use for different outputs. They are intended to be an exception to the default style you want to use.
example
Let's say you have text hyperlinks that are shown in blue font with an underline. That may be fine for Target A, but let's say you want this style to appear in black font with no underline for Target B. The solution is to use a style sheet medium.
Suppose Target A is using the "default" medium, where the blue underline properties are specified. With the properties for Target A already set, you now need to specify style properties for Target B. Therefore, in the Stylesheet Editor, instead of selecting the "default" medium, you can select another medium (e.g., the "print" medium) and change the properties for the style to black with no underline. It's the same style sheet and the same style that you are working with. The only difference is that one medium is telling Flare to display that content in blue with an underline, and the other medium is telling it to use black font with no underline. With Target A using the default medium and Target B using the other medium, the content will display appropriately in each output.
See About Style Sheet Mediums and Creating Topic Styles for Print Output.
A table style sheet allows you to single-source your formatting by setting the properties in one place and reusing them wherever you insert tables
examples
Let's say you create a table style sheet with a pattern design that displays the table with alternating green rows. The problem is that for printed output, you need the rows to display in light gray.
Suppose you decide to use the recommended solution (mediums). Let's say the target for online output is called Target A, and the one for print output is called Target B. the first step is to make sure you have two mediums. Suppose Target A is using the "default" medium, where the rows are set to use a green background. With the properties for Target A already set, you now need to specify style properties for Target B. Therefore, in the Table Style Editor, instead of selecting the "default" medium, you can select another medium (e.g., the "print" medium) and change the properties for the rows to light gray. It's the same table style sheet and the same pattern that you are working with. The only difference is that one medium is telling Flare to display that table rows with a green background, and the other medium is telling it to use light gray. With Target A using the default medium and Target B using the other medium, the tables will display appropriately in each output.
If you decide instead to use the other solution (two table style sheets), you first create a table style sheet and specify settings in it appropriate for online output (e.g., green background for table rows). Then you create a secondary style sheet. This extra table style sheet will have design settings that are appropriate for printed output (e.g., light gray table rows). When you insert the table into your content (or edit an existing table), you select the original online table style and also select the special print version of the table style. If you generate any targets based on an online format (DotNet Help, HTML Help, WebHelp, WebHelp Plus, WebHelp AIR, WebHelp Mobile), the end user will see green rows in the table. However, if you generate any targets based on a print format (Adobe PDF, XHTML, Microsoft XPS, Microsoft Word, Adobe FrameMaker), the end user will see light gray rows in the table.
Note: If you used print table styles in the past and want to remove them now in favor of the medium method, you can use an option in the Apply Table Style dialog in the Table Style Editor. When this option is enabled, print table styles will be removed from any tables updated by this dialog.
Following are the basic steps involved with using styles and style sheets in your project.
Create a new style sheet This entails adding to your project a new style sheet that is based on a template for an existing style sheet. Flare provides you with templates for both topic and table style sheets.
Note: You can also import an existing style sheet from outside your project.
Apply a style sheet To use the styles from a topic style sheet, you must link the style sheet to the appropriate file(s). It is recommended that you apply a master style sheet at the project or target level. The style sheet then automatically becomes available for all topics in that project or target. See Applying Master Style Sheets.
You also have the option of applying a style sheet to a single topic or to multiple topics at the same time. See Applying Style Sheets to Topics.
There are hundreds of tasks that you can perform in Flare by using styles. Following are some common tasks that you might perform when editing styles.
Look of generated glossary You can use styles to change the appearance of a glossary
Note: If you want to change the look of glossaries in online output, you can do so by modifying styles within your skin.
Look of generated index
Note: If you want to change the look of indexes in online output, you can do so by modifying styles within your skin.
Set Flare supports redacted text, which is text that is "blacked out" in Adobe PDF or Microsoft XPS output. This is much more efficient than attempting to black out text or other content after the document has been printed. You can set redacted text on any kind of content (e.g., characters, paragraphs, images, tables). You can do this locally at the font level by highlighting each piece of content
Using table style sheet You can modify the look and feel of multiple tables at once by editing the properties in a custom table style sheet. These table style sheets let you easily and quickly create patterns and different looks for tables. See How to edit styles in a table style sheet.
Using topic style sheet You can modify the look and feel of multiple tables at once by editing standard HTML table tags (e.g., <table>, <th>, <td>, <tr>) in your topic style sheet. For example, you might use these styles in order to control the look of the text that appears in your table headings (<th> style) or within the cells (<td> style). See Editing Table Styles in Topic Style Sheets.
When you insert a table, it is set up by default to use standard table tags in the individual cells (e.g., <th> for table headers, <td> for regular table text). However, if you press Enter at the end of a line, a <p> tag is added within the standard tag. Therefore, in order to keep all of the content in your table cells looking consistent, you may want to create a special style class of the <p> tag to be used for table content (e.g., p.tabletext) and apply that style to all of your cells when you first create a table. You can apply specific styles to tables by selecting the table cells, clicking Table>Cell Content Style, and choosing the style to be used for those cells. See Selecting Styles for Table Cell Contents.
Page layout breaks You can set page layout breaks on tables using a couple of different options. In topic style sheets, you can set breaks on the standard HTML table tags. The most common approach is to set breaks on table rows through the <tr> style tag. Another option is that you can set breaks on rows (and on entire tables) through a table style sheet. And because you can create patterns in table style sheets, each pattern item might have different settings for breaks. See Setting Page Layout Breaks on Tables.
Note: When controlling the look of tables, you should not create and use classes of standard HTML table tags (e.g., a class of the <tr> tag) if you also intend to use table style sheets.
Note: If you want to change the look of your TOC in online output, you can do so by modifying styles within your skin.
.
.
.
. Background You can change the background color for topics by using the <body> style or classes of that style. If you want the background color to be applied to all topics using a particular style sheet, you can use the main <body> style. If you want to change the background color for only some topics, create and use a class of the <body> style. See Applying Color to the Background for Topics.
You can also add a background image on topics by using the <body> style tag. See Setting a Background Image on Topics.
When applying styles to content, you may notice from time to time that the style you are looking for is not available from the drop-down list or Styles window pane when you try to select it. This can occur if you have not yet made any modifications to the style in the Stylesheet Editor. Therefore, before applying a style to content, make sure you first provide the necessary settings for the style.
Another possible reason for this has to do with the location of the cursor in the topic. Flare realizes where the cursor is placed and knows that only certain styles should be applied at that location.
example
Let's say that you have your cursor on a regular paragraph and you want to apply a list <li> style to it in order to turn it into the beginning of a bulleted list. Because it is not yet a list item, but rather a simple paragraph, you will not see your <li> style when you try to select it. Instead, you will see several paragraph styles in the list. In order to use the list style, you first need to turn the paragraph into a bulleted list item, by clicking the bullet button
in the Text Format toolbar or selecting an option such as Format>List>Bullet List.
Here is another example. If multiple paragraphs are selected or if the cursor is simply placed somewhere within a paragraph, the paragraph styles are shown in the Styles window pane. If only a portion of a paragraph is selected, the character styles are shown.
If you still do not see your style available for selection, try closing and re-launching Flare.
In addition to topic and table styles, you can use skin styles. For certain elements of the online output window (e.g., navigation pane, TOC or browse sequence entries, index keywords) you can determine skin style settings. You can edit styles in Standard skins
to make changes for WebHelp, WebHelp Plus, WebHelp AIR, DotNet Help, and HTML Help outputs. In addition, you can edit styles in WebHelp Mobile skins
to make changes for WebHelp Mobile output. When it comes to the Standard skin, please note that the vast majority of these skin styles pertain to WebHelp, WebHelp Plus, or WebHelp AIR output. Some of the settings (those that have to do with MadCap Feedback and toolbar items) also apply to HTML Help. DotNet Help output only supports skin style changes for toolbar items. See Specifying Skin Style Settings.
Note: For additional help on styles, you can download the Flare Styles Guide:
madcapsoftware.com/documentation/FlareV7/FlareStylesGuide.pdf
|
PDF Downloads: |
MadCap Software, Inc. 7777 Fay Avenue La Jolla, California 92037 Tollfree 1-888-MadCap1 Tel 858-320-0387 Fax 858-320-0338
For technical support: http://madcapsoftware.com/support/
Copyright 2011 MadCap Software |
The W3C and CSS Resources
See Also