Object styles
The ObjectStyle element — the page-item analogue of paragraph and character styles — its fill, stroke, and corner attributes, the RootObjectStyleGroup, and the [None] default that every frame in the reference packages applies.
An object style is the page-item analogue of a text style: it supplies the fill, stroke, and corner defaults a frame inherits.
In short: Where paragraph and character styles format text, an object style
formats a page item — a text frame, rectangle, oval, or
other shape — supplying the fill, stroke, and corner defaults the frame falls back
on when it carries no inline override of its own. Object styles live in
<RootObjectStyleGroup> inside Resources/Styles.xml, cascade through BasedOn
with the same first-setter-wins fold as the text styles, and bottom out at the
[None] default that every frame in the reference packages applies. A frame names
its object style with AppliedObjectStyle, and a colour attribute set to
Swatch/None normalises to unset so the cascade can fall through to a real colour.
Where paragraph and character styles format text, an object style formats a
page item — a text frame, rectangle, oval, or other shape.
It supplies the fill, stroke, and corner defaults a frame inherits when the frame
itself carries no inline override. Object styles cascade through BasedOn exactly
like the text styles, and resolve with the same first-setter-wins fold (see
the cascade).
Where they live
Each <ObjectStyle> sits inside <RootObjectStyleGroup> in Resources/Styles.xml
(with optional <ObjectStyleGroup> nesting the parser flattens). InDesign always
ships a set of defaults — [None], [Normal Graphics Frame], [Normal Text Frame], and [Normal Grid]. The one that matters most is [None].
The [None] default
ObjectStyle/$ID/[None] is the object style a frame applies when it wants no
style-supplied formatting — it sets no fill or stroke of its own, so the frame's
own inline attributes (or the bottom-of-cascade renderer defaults) stand. It is
the object-style counterpart of the [No paragraph style] and [No character style] roots, and it is the style every frame in the reference packages applies
via AppliedObjectStyle="ObjectStyle/$ID/[None]":
<RootObjectStyleGroup>
<ObjectStyle Self="ObjectStyle/$ID/[None]" Name="$ID/[None]"
FillColor="Swatch/None" StrokeColor="Swatch/None" StrokeWeight="0"
AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]"
CornerOption="None" CornerRadius="0"
StrokeAlignment="CenterAlignment" StrokeType="StrokeStyle/$ID/Solid"
Nonprinting="false"/>
</RootObjectStyleGroup>A frame names its object style with AppliedObjectStyle="…". When a frame
attribute is absent, the resolved object style fills it; Swatch/None on a colour
attribute normalises to unset so a BasedOn chain can fall through to a real
colour from a parent (so a placeholder rectangle can take its grey entirely from a
style).
Attributes
The parser reads the fill / stroke / corner subset the renderer consumes. The
Enable* category toggles and transparency / drop-shadow effect blocks that IDML
also stores on <ObjectStyle> are not yet acted on.
| Attribute · ObjectStyle | Type / values | Support | Notes |
|---|---|---|---|
| Self | string id | Supported | The style id, e.g. "ObjectStyle/$ID/[None]". What a frame references via AppliedObjectStyle. |
| Name | string | Parsed, not yet rendered | Human-readable name; resolution keys on Self. |
| BasedOn | string id | Supported | Parent object style id, or the [None] / [Normal …] default. Attribute or <BasedOn> Properties child. |
| FillColor | string (Color/Swatch id) | Supported | Frame fill paint. "Swatch/None" normalises to unset so the cascade can fall through. |
| FillTint | double (0–100%) | Supported | Fill tint percentage; cascades into a frame whose own FillTint is absent. |
| StrokeColor | string (Color/Swatch id) | Supported | Frame stroke paint. "Swatch/None" normalises to unset. |
| StrokeTint | double (0–100%) | Supported | Stroke tint percentage. |
| StrokeWeight | double (pt) | Supported | Stroke thickness in points. |
| CornerOption | None | Rounded | InverseRounded | Inset | Bevel | Fancy | Parsed, not yet rendered | Rounded maps to a rounded-rect path; the decorative variants currently fall back to Rounded until per-shape parsers land. |
| CornerRadius | double (pt) | Supported | Corner radius; honoured only when CornerOption is a rounding variant. |
| AppliedParagraphStyle | string (ParagraphStyle id) | Parsed, not yet rendered | Default paragraph style for a text frame using this object style; carried on the [None] default. |
(crates/paged-parse/src/styles.rs:216–243 defines the ObjectStyleDef fields
this table mirrors.)
Object styles meet the page-item side of the document in
frames and paths, where AppliedObjectStyle and a frame's
own inline fill / stroke combine the same way a run's local override combines with
its character style.
Frequently asked questions
What does an object style format? An object style formats a page item — a text frame, rectangle, oval, or other shape — supplying the fill, stroke, and corner defaults the frame inherits when it carries no inline override. It is the page-item counterpart of paragraph and character styles.
What is the [None] object style?
ObjectStyle/$ID/[None] is the object style a frame applies when it wants no
style-supplied formatting: it sets no fill or stroke of its own, so the frame's own
inline attributes (or the renderer defaults) stand. It is the object-style
counterpart of the [No paragraph style] and [No character style] roots, and it
is the style every frame in the reference packages applies.
Which object-style attributes does the parser read?
The parser reads the fill, stroke, and corner subset the renderer consumes —
FillColor, StrokeColor, StrokeWeight, CornerOption, CornerRadius, and the
like. The Enable* category toggles and the transparency and drop-shadow effect
blocks IDML also stores on <ObjectStyle> are not yet acted on.
How do an object style and a frame's own attributes combine?
A frame's own inline fill or stroke wins; whatever the frame leaves absent is
filled by the resolved object style, with Swatch/None on a colour normalised to
unset so a BasedOn chain can fall through. This is the same layering a run's local
override uses against its character style.
Character styles
The CharacterStyle element and its attributes — identity, BasedOn, font and size, fill, tracking — the RootCharacterStyleGroup, and how a range that applies a character style can still override one of its attributes locally.
Table and cell styles
The TableStyle and CellStyle elements — how a table style nominates a default cell style per region and sets its border strokes and alternating fills, and how a cell style carries per-edge strokes and fill.