Styles are used to control the look and feel of your documentation, and keep the content separate from its presentation. The styling is based on Cascading stylesheets (CSS), which is an international standard for formatting web content, developed by the World Wide Web Consortium (or W3C).
Flare lets you work with stylesheets in a number of ways. You can use a “master” stylesheet, automatically associating it with all files at the target level or project level (recommended). However, if you have some topics that you want to use a different stylesheet, you also have the option of associating those individual files with that other stylesheet. Once you’ve set up your stylesheet, you can apply its styles to the different pieces of content in your topics and snippets.
As much as possible, you should avoid the opposite of styles, which is local formatting. For example, you can highlight some text and make it green and italic right where that content exists. But if you make that same change in many places, it takes a lot longer and it's a lot more work to control the look of that content if you later change your mind.
See the following for more information about the basics of styles:
- The W3C and CSS Resources Learn about the organization behind cascading styles and other resources for learning more. See W3C and CSS Resources.
- What Can CSS Do? Learn about some of the different things CSS can be used to accomplish. See What Can CSS Do?.
- CSS Styles and Page Structure Learn about the different parts of an XML-based document and how they relate to corresponding style elements. See CSS Styles and Page Structure.
- Ways to Use CSS Learn about the three basic ways that you can use CSS—inline, embedded, external. See Inline, Embedded, and External CSS.
- Cascading Learn what is meant by the term "cascading" in CSS. See Cascading
- Style Terms and Concepts Learn about some of the most important style terms and concepts that you will encounter. See Important Style Terms and Concepts.
- Inheritance Learn about the concept of inheritance in CSS. See Inheritance.
There are two basic kinds of stylesheets in Flare—regular stylesheets and special table stylesheets. Each kind of stylesheet uses a different editor in Flare. See About Regular Stylesheets and About Table Stylesheets.
For the differences between regular stylesheets, table stylesheets, and local properties—and when you should use one over the other—see Regular Stylesheets, Table Stylesheets, or Local Formatting?
You can create and use both mediums and media queries in a stylesheet. These features can be an efficient alternative to using multiple stylesheets in your project. The two concepts are very similar; in fact, you will see them side by side in different places in Flare's user interface. However, mediums and media queries are not the same.
- Medium A medium is an alternative group of settings in a stylesheet and can be very useful when you are generating multiple kinds of outputs.
Unless you tell Flare otherwise, default style settings will be used for the different outputs you generate. But there may be times when you want to override a default style setting for a particular output; that's why you would use a medium. You need to explicitly tell Flare which medium you want a particular target to use. This is done from the Advanced tab of the Stylesheet Editor.
- Media Query A media query is an alternative group of settings in a stylesheet. These settings are automatically used under certain conditions, such as when a screen of a certain size is displaying the output. Media queries are able to do this because they are configured with specific criteria (e.g., maximum width of the screen, orientation, resolution). When the criteria are met, the style settings in the media query are used to display the output. You do not tell a Flare target to use a media query; it just happens automatically.