Add styling to a phrase

style

Use style shorthand notation to assign CSS styling directly to a phrase, without a classname or identifier or style-sheet.

Syntax

Style shorthand assigns a "style" attribute to a phrase. The syntax has four parts:

  • the circumflex "^" shorthand symbol
  • the CSS attribute name
  • a colon ":"
  • the CSS attribute value
semantax ^attr:value  Textual composition
Style shorthand notation

A phrase may have several styles applied to it. There are two approaches to doing this:

  • Using separate shorthand notation for each style
  • Enclosing all of the styling instructions within delimiters
semantax ^attr1:value1 ^attr2:value2    Textual composition
semantax ^"attr1:value1; attr2:value2" Textual composition
Style shorthand notation

Note that special care should be taken with attribute values that specify colors. When specifying RGB colors, the attribute value must be delimited with apostrophes or quotation marks — like this ^color:"#RGB" — in order to prevent the hashtag from being misinterpreted as identifier shorthand notation.

Shorthand attributes should be placed between a phrase's semantax and its textual composition. Shorthand attributes may optionally be preceded by one or more spaces. At least one space must be used after the last shorthand attribute, before the beginning of the textual composition.

A phrase may have any combination of shorthand attributes (#, ., *, ^, `, +, ? ) and they may specified in any order.

Examples

Here is what a style attribute looks like within the body of a manuscript.

menu ^list-style-type:none {
li Home
li Products
li Services
li ^color:"#777" Contact
}
Style shorthand examples

syntax > shorthand > styleAdd styling to a phrase

Q