You can take advantage of cascading stylesheets (CSS files) and the rules around them to control the look of your output in one place. This helps to keep the content separate from its presentation, which is very important when it comes to single-sourcing. CSS isn’t a MadCap Software idea. It’s an international standard for formatting web content, and it was developed by a group called the World Wide Web Consortium (or W3C). You can learn all about the W3C at w3.org.
Flare lets you work with stylesheets in a number of ways. You can associate stylesheets with individual topics (you might do this if you need to have multiple stylesheets for your output), or you can use a "master" stylesheet, automatically associating it with all files at the target level or project level. Then you apply the styles from the stylesheet to the different pieces of content in your topics and snippets.
The bottom line is that you want to avoid the opposite of styles as much as possible. That's called "local formatting." For example, you can highlight some text and make it green and italic right where that content exists. But if you do that same thing 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. Instead, it's much smarter and better to use a style.
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 Ways to Use CSS.
- Cascading Learn what is meant by the term "cascading" in CSS. See What is Meant by "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 Properties?
You can create and use both mediums and media queries in Flare. 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. So what is the difference between a medium and a media query?
- 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.