Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 22 Setting up CSS for HTML > 22.7 Assigning CSS classes > 22.7.2 Mapping paragraph formats to CSS classes

### 22.7.2 Mapping paragraph formats to CSS classes

When you use CSS, by default Mif2Go maps each FrameMaker paragraph format name to a CSS class of the same name, applying to the name any needed transformations (see §22.7.1 Understanding CSS class name restrictions).

For a paragraph format, by default the class name in the Mif2Go-generated CSS file is preceded by the tag name and a dot:

tagname.classname

The tag name comes from whatever is specified for that format in [ParaTags] (see §21.3 Mapping paragraph formats), or else <p>. Unless you assign classes explicitly, the class name is based on the FrameMaker paragraph format name.

For example, suppose your FrameMaker document includes catalogued paragraph formats Chap_Title, Heading, and Body, with the first two assigned HTML tags in [ParaTags]. Mif2Go would treat these formats as follows, provided ClassIsTag=No (see §22.7.9 Using CSS class names as tags for XML):

FM format name | [ParaTags] | Mif2Go HTML output | Mif2Go CSS entry
Chap_Title | Chap_Title=H1 | <h1 class="chaptitle"> | h1.chaptitle {...}
SubHead | SubHead=H2 | <h2 class="subhead"> | h2.subhead {...}
Body | (no setting) | <p class="body"> | p.body {...}

Mif2Go includes as many of the following properties as apply, based on the format properties in your document (as modified by any imported conversion template), for each paragraph format (class) in the CSS file:

font: [ italic | small-caps | bold ]

margin: top right bottom left

text-align: [ center | right ]

text-indent: [for first line, negative for hang]

text-decoration: [ underline | line-through ]

text-transform: [ uppercase | lowercase | capitalize ]

color: #RRGGBB

To explicitly map individual FrameMaker paragraph format names to CSS class names:

[ParaClasses]

; Document style name = class to use (default is based on name)

; For XML, the class is used as the tag name by default.

FormatName=classname

Or:

[ParaTags]

FormatName= class="classname"

If you assign class names to the same format in both [ParaClasses] and [ParaTags], and the class names are different, Mif2Go uses the [ParaTags] setting for backward compatibility. See §21.3.1 Assigning HTML tags and attributes to paragraph formats.

Anchor paragraph class

If your document uses a special paragraph format to anchor graphics, you can specify a class name for the anchor format:

[Graphics]

; GraphClass = class name to use for paras created to hold <img> tags

GraphClass=graphic

XML

For XML output, see §14.4.2 Deriving XML tags from format and class names.

> 22 Setting up CSS for HTML > 22.7 Assigning CSS classes > 22.7.2 Mapping paragraph formats to CSS classes

| Mif2Go User's Guide: 22.7.1 Understanding CSS class name restrictions |  | Mif2Go User's Guide: 22.7.3 Mapping character formats to tags or span classes |