# Cell style inheritance and specifying the same style twice [duplicate]

### Bug introduced in V11.1 or earlier and persists through V11.3

[CASE:4061571], confirmed

Consider the following three examples of a cell:

CellPrint@Cell["i", "Section"]
CellPrint@Cell[BoxData@InterpretationBox[Cell@"i", 2], "Section"]
CellPrint@Cell[BoxData@InterpretationBox[Cell@"i", 2], "Section", "Section"]


which yields:

Notice how the second cell has some strange mixture of styles applied. According to the documentation of Cell:

Cell[contents,"style1","style2",…] represents a cell with multiple styles applied to it.

So there should be nothing special about the third line.

While I am pretty sure that this is a bug, I have noticed that the documentation pages all do the same thing for their heading cells:

Cell[
TextData[{…,"Basic Examples",…}],
"ExampleSection",
"ExampleSection",
WholeCellGroupOpener->True
]


So I'm not so sure anymore where the issue lies. This brings me to the purpose of this question:

• What is happening in the second/third example?
• Why are only some styles applied, but not others?
• Why is the reasoning behind applying the same style twice? (and why does it make a difference?)
• Is this behavior documented anywhere?