Styles are elements that contain formatting settings. You can apply styles to your content to change the way it looks. Styles are recommended over local (or "inline") formatting and are particularly important in Flare. They make it possible to separate the content from the presentation and allow you to apply formatting to multiple places at once. Rather than using local formatting to change the look of content (e.g., highlighting text and using the toolbar to increase the font size), it is recommended that you use styles whenever possible (e.g., setting the font size on a style and then applying that style to the appropriate content).
example
The heading above (
Styles are stored within cascading style sheets (files with a .css extension). After you add style sheets to a project, they are stored in the Resources folder of the Content Explorer. The exception to this is when you import source files that already include a style sheet. In that case, Flare retains the structure of the imported files, storing the style sheet in the same location where it resided in the source files.
Using styles instead of local (or "inline") formatting helps you work more efficiently and with more consistency in your topics. If you need to make changes to the formatting in the future, you do not need to change the formatting in each topic (as you would with local formatting). Instead, you only need to change the formatting properties for that style in the appropriate style sheet.
Best Practice: Use styles instead of local formatting.
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/support/files/documentation/Styles/styles.css
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, you can also use a topic style sheet to modify standard HTML 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). If you like, you can use both kinds of style sheets to change the look of tables.
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 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.
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).
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).
The vast majority of the styles and style properties in Flare were developed by the World Wide Web Consortium (W3C). There are additional styles and properties that are specific to Flare to support the unique features in the application.
The Simplified view of the Stylesheet Editor allows you to set only some of the more common properties. The Advanced view allows you to set all of the properties.
For more thorough information about each W3C style and property, refer to http://www.w3.org and use the search feature on the website. Also, the following additional resources are highly recommended:
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
Also, when you select a property in the Stylesheet Editor, a short description of the property is displayed at the bottom of the editor.
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|variable>). There are also many MadCap-specific properties. You will recognize these properties because they always start with "mc" (e.g., mc-footnote-format, mc-language).
These special styles and properties have been added to style sheets in order to support some of the unique features available only in MadCap Software products.
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 from the drop-down in the Stylesheet Editor, the <h1> style will be listed.
See About Auto-Numbers.
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.
See About Master Pages.
How to use multiple master pages by creating topic styles
to save your work.
to turn on the structure bars. In the popup 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…").
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).
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: Use master style sheets at the project or target level.
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.
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 print style is an alternative set of table styles intended for use in print-based outputs (Adobe PDF, XHTML, Microsoft XPS, Microsoft Word, Adobe FrameMaker).
example
Let's say that you insert tables into several topics and apply a table style to them that uses a green border. This might be fine for online outputs (such as DotNet Help or WebHelp), but what if you need to create printed output that displays everything in black and white? Option 1 is to create two different tables in each of those topics (one with a green border and one with a black border), and then use condition tags to separate them into the appropriate targets when you build the output. Option 2 is to manually fix your tables when you generate the printed output, changing all of the green borders to black. Option 3 is to use a print version of the table style, which is much easier and less time-consuming.
Therefore, you create a new table style to be used only for print output. It might even be identical to the your default table style, except that the print table style uses black for the borders. When you insert a new table or edit an existing one, you click the Print Style button (in the Insert Table dialog or Table Properties dialog) and select your new table style.
Following are the basic tasks 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.
Note: If you want to change the look of your TOC in online output, you can do so by modifying styles within your skin.
.
.
.
. 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.
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.
Note: For additional help on styles, you can download the Flare Styles Guide:
madcapsoftware.com/support/files/documentation/FlareV4/FlareStylesGuide.pdf
|
Downloads (PDF Format): Flare Transition From RoboHelp Guide |
MadCap Software, Inc. 7777 Fay Avenue La Jolla, California 92037 Tollfree 1-888-MadCap1 Tel 858-320-0387 Fax 858-320-0338 |
Why Not Just Format Content Directly?
See Also