The DITA Customization plugin allows you to associate a CSS to define the styling information for the DITA elements. This topic lists all supported CSS properties plus FrameMaker-specific extensions. You will also find information about the selectors and pseudo classes that are supported.
Not all CSS selectors, pseudo classes and combinations are currently supported. Some are impossible to map to EDD contexts, others are simply not programmed yet.
Selector | Example | How this is handled |
---|---|---|
[name] | p | AllContextRule |
[whitespace] | section p | ContextRule on child element - context is * < followed by a parent |
> | section > title | ContextRule on child element - context is section before the selector |
:before | note:before { content: ‘NOTE:’ } | Prefix rule - text between quotes in content format rule is entered as prefix string |
:after | note:after { content: ‘NOTE:’ } | Suffix rule - text between quotes in content format rule is entered as suffix string |
[attr=value] | p[audience=”novice”] | ContextRule on element - context is attribute value (only exact matches) |
[name]:first-child | ol > li:first-child | ContextRule on child element - context is {first} inside the parent |
[name:last-child | section > p:last-child | ContextRule on child element - context is {last} inside the parent |
*:first-child | section > *:first-child | AllContextRule on FirstParagraphRules of the parent element |
*:last-child | section > *:last-child | AllContextRule on LastParagraphRules of the parent element |
Currently supported CSS properties and values.
Property | Value(s) | FrameMaker EDD mapping |
---|---|---|
display | ‘inline’ | TextRangeFormatting > TextRange |
color | color | PropertiesFont > Color |
background-color | color | BackgroundColor |
margin-bottom | size | PropertiesBasic > ParagraphSpacing > SpaceBelow |
margin-left | size | PropertiesBasic > Indents > LeftIndent |
margin-right | size | PropertiesBasic > Indents > RightIndent |
margin-top | size | PropertiesBasic > ParagraphSpacing > SpaceAbove |
text-align | ‘left’ | PropertiesBasic > PgfAlignment > Left |
‘right’ | PropertiesBasic > PgfAlignment > Right | |
‘center’ | PropertiesBasic > PgfAlignment > Center | |
‘justify’ | PropertiesBasic > PgfAlignment > Justified | |
text-indent | size | PropertiesBasic > Indents > FirstIndent |
text-transform | ‘uppercase’ | PropertiesFont > Case > UpperCase |
‘lowercase’ | PropertiesFont > Case > LowerCase | |
text-decoration | ‘underline’ | PropertiesFont > Underline > Single |
‘overline’ | PropertiesFont > Overline | |
‘line-through’ | PropertiesFont > Strikethrough | |
font-family | string | PropertiesFont > Family |
font-size | size | PropertiesFont > Size |
font-stretch | ‘ultra- condensed’ | PropertiesFont > Stretch > 50% |
‘extra- condensed’ | PropertiesFont > Stretch > 60% | |
‘condensed” | PropertiesFont > Stretch > 72% | |
‘semi- condensed’ | PropertiesFont > Stretch > 86% | |
‘normal’ | PropertiesFont > Stretch > 100% | |
‘semi- expanded’ | PropertiesFont > Stretch > 120% | |
‘expanded’ | PropertiesFont > Stretch > 144% | |
‘extra- expanded’ | PropertiesFont > Stretch > 173% | |
‘ultra- expanded’ | PropertiesFont > Stretch > 207% | |
font-style | ‘normal’ | PropertiesFont > Angle > Regular |
‘italic’ | PropertiesFont > Angle > Italic | |
‘oblique’ | PropertiesFont > Angle > Italic | |
font-variant | ‘normal’ | PropertiesFont > Case > Normal |
‘small-caps’ | PropertiesFont > Case > SmallCaps | |
‘all-caps’ | PropertiesFont > Case > AllCaps | |
font-weight | ‘normal’ | PropertiesFont > Weight > Bold |
‘bold’ | PropertiesFont > Weight > Bold | |
‘100’ | PropertiesFont > Weight > Regular | |
‘200’ | PropertiesFont > Weight > Regular | |
‘300’ | PropertiesFont > Weight > Regular | |
‘400’ | PropertiesFont > Weight > Regular | |
‘500’ | PropertiesFont > Weight > Bold | |
‘600’ | PropertiesFont > Weight > Bold | |
‘700’ | PropertiesFont > Weight > Bold | |
‘800’ | PropertiesFont > Weight > Bold | |
‘900’ | PropertiesFont > Weight > Bold |
You must use the double-dash “--” along with FrameMaker-specific properties, as shown in the following table.
Property | Value(s) | FrameMaker EDD mapping |
---|---|---|
--fm-pgf-box-color | color | PropertiesAdvanced > PgfBoxColor |
--fm-text-decoration | ‘double underline’ | PropertiesFont > Underline > Double |
‘numeric- underline’ | PropertiesFont > Underline > Numeric | |
--fm-font-variant | ‘subscript’ | PropertiesFont > SuperscriptSubscript > Subscript |
‘superscript’ | PropertiesFont > SuperscriptSubscript > Superscript | |
--fm-banner-text | string | BannerText (only on element) |
--fm-descriptive-tag | string | DescriptiveTag (only on element) |
--fm-frame-above | string | PropertiesAdvanced > FrameAbove |
--fm-frame-below | string | PropertiesAdvanced > FrameBelow |
--fm-pgf-format-tag | string | ParagraphFormatTag |
--fm-char-format-tag | string | CharacterFormatTag |
--fm-autonum-string | string | PropertiesNumbering > AutonumberFormat > [string] |
--fm-autonum-position | ‘start’ | PropertiesNumbering > Position > StartOfParagraph |
‘end’ | PropertiesNumbering > Position > EndOfParagraph | |
--fm-hyphenate | ‘yes’ | PropertiesAdvanced > Hyphenation > Hyphenate > Yes |
‘no’ | PropertiesAdvanced > Hyphenation > Hyphenate > No | |
--fm-hyphenate- max-adjacent | integer | PropertiesAdvanced > Hyphenation > MaxAdjacent |
--fm-hyphenate- shortest-prefix | integer | PropertiesAdvanced > Hyphenation > ShortestPrefix |
--fm-hyphenate- shortest-suffix | integer | PropertiesAdvanced > Hyphenation > ShortestSuffix |
--fm-hyphenate- shortest-word | integer | PropertiesAdvanced > Hyphenation > ShortestWord |