# Updating styles which are based on styles changed in private stylesheet

### Intro

Styles can inherit from other styles: base one style on another?

And for example WolframAlphaLong is inheriting from Input style.

However, if you modify Input in your private stylesheet, this change won't be reflected in WolframAlphaLong.

### Question

What is a generic or fast way to make them respecting those changes?

### Example

CellPrint[Cell["integrate x", "WolframAlphaLong"]]

SetOptions[
EvaluationNotebook[],
StyleDefinitions -> Notebook[{
Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["Input"], FontSize -> 25]
}]
]


As you can see, "integrate x" has old font size setting.

In this particular case it seems to be inheriting its font characteristics from TextForm because of FormatType->TextForm in its style definition.

CellPrint[Cell["integrate x", "WolframAlphaLong"]]

SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[{
Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["Input"], Black, 12],
Cell[StyleData["TextForm"], Red, 18]
}]]


• If you copy WALong definition from Default.nb and put at the bottom of your private stylesheet, then WALong will inherit Input changes. It wwould be nice to have that done automatically. FormatType is what contributes to the given style too but TextForm doesn't have any FontSize specs in Default.nb. The problem is, I want to change Input and I can't use that method because not every style that Inherits from Input have a TextForm FormatType, likewise those styles that don't (have Input parent) may have TextForm and I don't want them to be updated.
– Kuba
Feb 25, 2016 at 5:26
• It is something important here though, your answer shows that while StyleDefinitions -> StyleData["Input"]-like parents are resolved for each stylesheet for current "styles stack" while FormatType inheritance is resolved at the end, at a notebook level probably. Whatever that means :)
– Kuba
Feb 25, 2016 at 5:29