Baffled by base document style

Backstory:

I have a default document template which has a Whole Document style which has a font size of 13.

I wanted a named style to have a font size of 12. Try as I could, I could not set the font to size 12.

Workaround:

I figured out that I needed to have a named style called, say, ‘document’ which was then included in both the Whole Document style and my named style. I could then set the font size of the named style to 12.

Having finally figured this out, I’m less frustrated, but I still have one question:

Why are the internal defaults (font: Helvetica, font size: 12, row padding: 4, etc.) the default style inherited by new named styles in a document instead of the Whole Document style?

I would think that the Whole Document style should be the basis for all other styles in the document. Perhaps this is a bad idea.

Any illumination would be appreciated.

Why are the internal defaults (font: Helvetica, font size: 12, row padding: 4, etc.) the default style inherited by new named styles in a document instead of the Whole Document style?

Because that’s how the Cocoa text system has historically worked. The “default” text attributes are 12pt Helvetica. The style system extends that with other “backstop” style attributes.

I would think that the Whole Document style should be the basis for all other styles in the document. Perhaps this is a bad idea.

It’s not a bad idea, but it does require some thought and design, especially when considering interoperability with exporting rich text to the pasteboard or RTF.

Thanks for the clarification.

I would’ve hoped that the Cocoa defaults were meant for defaults when nothing else was present.

Another behavior which the OO style system which is odd to me (though understandable) is the following:
create a new style called, say ‘biggie’
set the font size to 18pt
derive a style from ‘biggie’ called, say ‘uhoh’
set the font size to 16pt
change the font size for ‘biggie’ to 16pt
–> Presto! The explicitly-set font size for ‘uhoh’ disappears
change the font size for ‘biggie’ back to 18pt
–> Uhoh! Because the font size for ‘uhoh’ disappeared before, it now has no font size set

So the bad news is that whenever changing attributes to a style which is used by other styles, you need to know all the other attributes of all the other derived styles, because you might end up clobbering an attribute set in one of those other styles even if you change the parent’s setting back to its original.

What I would think should happen would be that explicitly-set settings would stay explicitly set until explicitly unset. Settings which were never set would (of course) follow the settings of the parent.

Is this also Cocoa related?