Skip to main content

Style Properties

Style properties control the visual appearance of blocks when rendered to HTML or print. They are pipe properties that the renderer maps directly to CSS.

The 10 style properties

PropertyCSS MappingExample ValuesNotes
color:colorred, #ff0000, rgb(255,0,0)Any CSS color value
size:font-size0.85em, 18px, 12ptAny CSS size unit
family:font-familyGeorgia, InterFont name
weight:font-weightbold, 600, normalCSS font-weight values
align:text-aligncenter, right, justifyAlso adds class .intent-align-center etc.
bg:background-coloryellow, #fffde7Any CSS color value
indent:padding-left2em, 20pxAny CSS length
opacity:opacity0.5, 0.60–1 range
italic:font-style: italictrueBoolean — only "true" applies
border:border: 1px solid currentColortrueBoolean — only "true" applies

Usage examples

text: This is important | color: red | weight: bold
text: Subtle aside | color: #666 | size: 0.85em | italic: true
quote: Key insight | bg: #fffde7 | border: true | indent: 2em
warning: Deadline tomorrow | color: #d32f2f | bg: #ffebee | weight: bold
text: Fine print | size: 0.75em | opacity: 0.7 | align: center

How style properties work

  1. The parser stores all pipe properties as key-value pairs
  2. The renderer checks each property against the 10 known style names
  3. Known style properties are mapped to inline CSS styles
  4. align: additionally adds a CSS class (e.g., .intent-align-center)
  5. Unknown style values are silently ignored — the document remains valid
<!-- note: Important | color: red | weight: bold -->
<div class="intent-block intent-note" style="color: red; font-weight: bold;">
<p>Important</p>
</div>

Boolean properties

italic: and border: are boolean. Only the value "true" activates them — any other value (or omitting the property) means no effect.

text: Emphasized | italic: true
text: Boxed content | border: true
text: Both | italic: true | border: true

Combining style and functional properties

Style properties coexist with functional properties on any block:

quote: The future belongs to those who believe | by: Eleanor Roosevelt | color: #1a237e | bg: #e8eaf6 | italic: true
metric: Revenue | value: 1200000 | target: 1000000 | unit: USD | color: green | weight: bold | size: 1.4em
contact: Sarah Chen | role: CEO | email: sarah@acme.co | color: #2563eb

Inline formatting

IntentText supports inline formatting within any content string. These follow WhatsApp-style conventions and are processed within a single line only.

SyntaxResultDescription
*text*textBold
_text_textItalic
~text~textStrikethrough
```text```textInline code (triple backtick)
`text`LabelLabel / badge (single backtick)
{text}LabelLabel / badge (curly braces)
^text^textHighlight
==text==Quoted emphasisInline quote
[text](url)HyperlinkHyperlink
[[text]]Side-noteInline note / comment
[[label|url]]LinkInline link shorthand
@person@personMention
#topic#topicTag
@todayCurrent dateDate — resolves to ISO string
@tomorrowTomorrow's dateDate — resolves to ISO string
@YYYY-MM-DDExplicit dateDate literal
[^N]Superscript NFootnote reference

Rules

  • Inline formatting is processed within a single line only — no multi-line spans
  • Non-nesting — overlapping marks are treated as plain text
  • Unmatched delimiters are treated as literal characters
  • Inline parsing happens after pipe splitting
  • Maximum inline content length: 100K characters

Examples

text: The deadline is *tomorrow* at _5pm_. Contact @sarah for details.
text: Use the ```render()``` function to generate output. See #api-reference.
text: Revenue is ^up 12%^ this quarter — exceeding our ~original~ revised target.
text: Read the [full report](https://example.com/report) for details.