Using the Style Inspector

The Style Inspector is part of the Formatting window pane, which you can open by selecting Home > Formatting Window. This feature lets you see the style details for selected content in the open file, and even edit styles for .htm and .mcdoc files, without having to open the full stylesheet. Other file types (e.g., .fltrev, .mcco, mcpgl) are not supported in the Style Inspector.

Viewing Style Settings and Formatting for Specific Content

Whenever you click on certain content or select it in the XML Editor, the Style Inspector adjusts, showing the following information:

  • Name of Style

    If you click next to the style name, the content for the parent tag will be selected and its style and properties will be shown in the window pane instead.

  • Local Formatting If the selected content has any local formatting, this is indicated under the red “Local style attributes” area.

    If you want to keep the look of the content, but use styles instead of local formatting, you can create a new style class based on the formatting. This can be done by using in the local toolbar or the right-click menu. See Creating Style Classes.

  • Style Properties and Values Below any local attributes, the Style Inspector shows all of the properties and values that are explicitly set for the style.

  • Stylesheet(s) To the right of the style name, you can see the stylesheet where the properties are set.

    If you hover over the stylesheet name, you can see its path.

  • Inherited Properties In addition to the style for the selected content, you will also see parent styles in the Style Inspector. These are tags that the current tag is placed within; therefore, the style for the selected content will inherit style settings from those parent styles, as well as using its own settings. Every tag you add to a content file is found within the <body> tag, so at the very least, your style will be inheriting property values from the body style. But your tag might also appear within other tags, therefore inheriting from those styles as well.

    If you see a property that is crossed out, it means the value was being inherited but has been overridden in the child style.

    If you see a property in gray, it means the property is inherited but is not currently being used by the content in the child tag.

  • Property Description Similar to the Stylesheet Editor, a description of each property is shown at the bottom when you click on it.

Creating Style Classes

From the Style Inspector, you can create a new style class based on the properties of the selected style, as well as any local formatting that also might be applied to the content in the file.

When you do this, the Create Style dialog opens. From here, you can provide a name for the new class (or ID), add a comment, include or exclude any of the relevant property values, and choose whether you want to update the source document at the same time.

Also, when you are finished creating the new style class, the stylesheet is automatically opened (if it wasn’t already). It is necessary to do this, because by creating the style class, you have made a change to the stylesheet.

Adding Properties to Styles

You can quickly and easily add properties to the styles shown in the Style Inspector by clicking the small plus sign at the bottom of the list of existing properties.

This opens a field at that location. You can either type the name of the new property in that field or select it from the drop-down.

Until you edit a value for the property, it will show the value as inherited.

Editing Property Values

You can change the values for most properties shown by clicking the ellipsis (…) to the right of the property.

For other properties, you can just click directly in the field and type the new value.

After this, enter the value in the popup. The type of popup depends on the kind of property that you are modifying.

Adding Comments to Styles

Just as you can add comments to styles in the regular stylesheet (see Adding Comments to Styles), you can also do this in Style Inspector.

Start by right-clicking a style in the Style Inspector, then select Add Comment.

A text box displays below the style, where you can type the comment.

After you press ENTER, the comment appears in green text.

If you want to edit the comment, simply click on the comment and the text box will appear, allowing you to type in it.

Modifying the Stylesheet—Undo or Dismiss

Whenever you make changes to styles (e.g., add properties, edit values) in the Style Inspector, you will see a message that the stylesheet has been edited. You can either undo your change or dismiss the message, in which case your edits will remain.

Hiding Styles With Non-Inherited Properties

By their very nature, many style properties are considered “inherited,” while a significant number of others are “non-inherited.” This refers to how the properties act when tags are nested in a content file, such as a topic or snippet. Inherited properties for one style will trickle down to the content found in another tag within it. On the other hand, non-inherited properties will not be used by the content in the nested tags.

The Style Inspector shows both inherited and non-inherited properties by default. However, you can select an option that hides styles and their properties. This option works under either of the following conditions:

  • A style contains only non-inherited properties.
  • A style is empty (i.e., does not have any properties).

To hide such styles and properties, click in the local toolbar. Click it again to show the styles and properties.

Note If a style has non-inherited properties within it, but also has at least one inherited property, this option will not hide any of the properties. They will all be shown whether you select the “hide” option or not.

Including System Styles

By default, the Style Inspector shows styles and properties from your local stylesheet(s). However, there might also be many other styles and properties at work in the file that you have open; these other styles and properties are inherited from system (or “factory”) stylesheets that are located where you installed Contributor.

If you want to see these other styles and properties, click in the local toolbar.

Note Although you can view styles and properties from system stylesheets, you cannot edit them in the Style Inspector.