The question I'll answer here is "How is the cell style of a given cell resolved." There are several other questions one could ask about option resolution, and I won't attempt to answer all of them here, but I will show in some exhaustive detail, at the cell level, what's happening.
First, a parent set of options is calculated at the notebook level and passed down to cells. I won't discuss how those are computed (feel free to ask another question about that), but the options passed down from the notebook level are identical to all cells within that notebook (except inline cells, which inherit many properties from their parent cells...once again, that goes a bit beyond the scope of my answer).
Starting with those options, further options are merged in from the following locations:
- The fully resolved style corresponding to the primary stylename, if one exists.
- If the cell is a docked cell, then stylenames/options from the
DockedCellsStyle option are applied.
- The cell's
FormatType is determined, and the named style corresponding to the
FormatType is applied.
- If the cell is an inline cell, the named style "InlineCell" is applied.
- If the cell is an inline cell which is presently being edited, the named style "InlineCellEditing" is applied.
- If the style has multiple stylenames applied to it, then the further stylenames are resolved and applied in order of appearance.
- Finally, the options set specifically on the cell are applied.
More should be said about how stylenames are resolved into styles (which is to say, a collection of option settings). Without touching on issues of style or stylesheet inheritance, here is what happens every time a named style is resolved for use by a cell:
- Begin with the "All" style.
- Merge in the named style definition.
- If one exists, merge in the environment-specific version of the style definition.
So, back to the initial question. Why does setting a font on the "All" style affect the style resolution of a "Section" cell, which one would expect to override the "Section" cell? The issue here comes up in the resolution of the
FormatType. Section cells have a
TextForm, and Mathematica is making an attempt to resolve the named cell style "TextForm". In doing so, it's pulling in "All" yet again.
I, for one, don't really find the "All" style all that useful. I much prefer to work with either generic environment styles (e.g.,
StyleData[All, "environment name"]) or the "Notebook" style. Those styles are applied exclusively at the notebook level, and so become part of the background default that all cells inherit from, as I describe above.