Paged.The open publishing system
The format atlas
Styles

IDML Reference / Styles

Object styles

The ObjectStyle element — the page-item analogue of a text style — its fill, stroke and corner attributes, its Enable switches, and the built-in [None] style.

Tier: IntermediateIntermediateIIreference

Reviewed against engine v0.71.12

An object style supplies the formatting a frame or shape takes when it does not set a value itself.

In short Where paragraph and character styles format text, an <ObjectStyle> formats a page item: a text frame, rectangle, oval, polygon or line. It can carry fill, stroke and corner settings, transparency effects, text frame options, text wrap and anchored-object settings. A page item names its style with AppliedObjectStyle. Object styles inherit through BasedOn, written as a typed <Properties> child, and the item's own attributes win over the style.

Where they live

Object styles sit under <RootObjectStyleGroup> in Resources/Styles.xml, optionally inside <ObjectStyleGroup> folders. InDesign writes a set of built-ins into every document:

  • ObjectStyle/$ID/[None] — no fill, no stroke; the style an item has when it has none.
  • ObjectStyle/$ID/[Normal Graphics Frame] — the default for new graphic frames and shapes.
  • ObjectStyle/$ID/[Normal Text Frame] — the default for new text frames.
  • ObjectStyle/$ID/[Normal Grid] — the default for frame grids, used in CJK layouts.

A rectangle with no fill or stroke of its own applies the "Panel" object style, which is based on [None] and supplies a 40 % red fill and a 2 pt black stroke.

Resources/Styles.xmlRead / the source
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Styles xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <RootCharacterStyleGroup>
    <CharacterStyle Self="CharacterStyle/$ID/[No character style]" Name="$ID/[No character style]"/>
  </RootCharacterStyleGroup>
  <RootParagraphStyleGroup>
    <ParagraphStyle Self="ParagraphStyle/$ID/[No paragraph style]" Name="$ID/[No paragraph style]" PointSize="12" FillColor="Color/Black">
      <Properties>
        <AppliedFont type="string">Open Sans</AppliedFont>
      </Properties>
    </ParagraphStyle>
  </RootParagraphStyleGroup>
  <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" EndCap="ButtEndCap" EndJoin="MiterEndJoin" MiterLimit="4" StrokeAlignment="CenterAlignment" StrokeType="StrokeStyle/$ID/Solid" Nonprinting="false"/>
    <ObjectStyle Self="ObjectStyle/Panel" Name="Panel" EnableFill="true" EnableStroke="true" FillColor="Color/Red" FillTint="40" StrokeColor="Color/Black" StrokeWeight="2">
      <Properties>
        <BasedOn type="object">ObjectStyle/$ID/[None]</BasedOn>
      </Properties>
    </ObjectStyle>
  </RootObjectStyleGroup>
</idPkg:Styles>

Attributes

Attribute · ObjectStyleValuesSeen in
FillColorColor / Swatch reference100%
FillTintnumber (percent)89%
StrokeColorColor / Swatch reference100%
StrokeTintnumber (percent)89%
StrokeWeightlength (pt)100%
StrokeTypeStrokeStyle reference100%
StrokeAlignmentCenterAlignment100%
CornerOptionNone | RoundedCorner | InverseRoundedCorner | InsetCorner | BeveledCorner | FancyCorner100%
CornerRadiuslength (pt)100%
TopLeftCornerOptionNone89%
TopLeftCornerRadiusinteger / real89%
AppliedParagraphStyleParagraphStyle reference100%
Selected attributes. Seen in: the share of documents with a ObjectStyle that set it. All 64 attributes of ObjectStyle; what Paged reads, edits and writes is in its Paged support panel.

Corners come in two spellings, and InDesign writes both: CornerOption and CornerRadius for all four corners, and TopLeftCornerOption, TopRightCornerOption, BottomLeftCornerOption and BottomRightCornerOption, each with its own …CornerRadius. It reads only the second. A style with just the all-corner pair gives its items square corners; where the two disagree, the per-corner attributes win; and a per-corner option with no radius is 12 pt, whatever CornerRadius says. The corner tokens are None, RoundedCorner, InverseRoundedCorner, InsetCorner, BevelCorner and FancyCorner.

AppliedParagraphStyle gives the paragraph style a text frame's new text starts in; ApplyNextParagraphStyle chains through the paragraph styles' NextStyle.

Enable switches and categories

An object style is a set of categories, and each category has an Enable… switch: EnableFill, EnableStroke, EnableStrokeAndCornerOptions, EnableParagraphStyle, EnableTextFrameGeneralOptions, EnableTextFrameBaselineOptions, EnableTextWrapAndOthers, EnableAnchoredObjectOptions, EnableFrameFittingOptions and others. A category whose switch is false is not part of the style: applying the style leaves that aspect of the item alone. The categories' settings are child elements of the style: <TextFramePreference>, <TextWrapPreference>, <AnchoredObjectSetting>, <FrameFittingOption>, and the <ObjectStyle…EffectsCategorySettings> blocks for transparency effects on the object, its fill, stroke and content.

In Paged: an object style's fill, fill tint, stroke, stroke tint and stroke weight cascade into the items that apply it, and its four per-corner attributes into a rectangle that states no corners of its own, each through BasedOn as InDesign reads them; all five corner shapes are drawn. Its Enable… switches decide which of these reach the item, and its text-frame options, text wrap and anchored-object settings apply to an item that does not state its own. The AppliedParagraphStyle default and the effect categories are not read yet. Swatch/None on an object style is read as unset rather than "no paint". Object styles survive a save, and an edited style is written back with its corners in both spellings. Supported · verified Supported · verified

How the style and the item combine

A frame's own attributes win. Whatever the frame leaves out comes from its object style, resolved through that style's BasedOn chain. This is the same layering a run's local override has over its character style.

Frequently asked questions

What does an object style format? A page item: a text frame, rectangle, oval, polygon or graphic line. It can carry fill, stroke, corners, transparency effects, text frame options, text wrap and anchored-object settings.

What is the [None] object style? InDesign's built-in style with no fill and no stroke. An item that applies ObjectStyle/$ID/[None] takes its whole look from its own attributes.

What do the Enable… attributes on an object style do? Each switches one category of the style on or off. A disabled category is not part of the style, so applying the style does not touch that aspect of the item.

How are rounded corners written on an object style? With the per-corner TopLeftCornerOption / TopLeftCornerRadius family, which is what InDesign reads. It also writes CornerOption="RoundedCorner" and CornerRadius for all four corners, which it ignores.

On this page