The stylesheet specifies that the window opens with a lightRed background color. The window contains 2 presenters called "tab" and "selectedTab", each having a nested label. The stylesheet defines a white border around a tab, and a white background for a selected tab.
However, the code opens this window:
That is not what we expect. We expect the background color of the label with text "Selected" to be white, not the background color of the window. Apparently, the inherited background color of the surrounding "selectedTab" presenter is not applied.
Consider this code:
The stylesheet specifies that the window opens with a
lightRed
background color. The window contains 2 presenters called "tab" and "selectedTab", each having a nested label. The stylesheet defines a white border around a tab, and a white background for a selected tab.However, the code opens this window:
That is not what we expect. We expect the background color of the label with text "Selected" to be white, not the background color of the window. Apparently, the inherited background color of the surrounding "selectedTab" presenter is not applied.
Is this issue related to other issues with stylesheets and labels, such as https://github.com/pharo-spec/Spec/issues/1256?
Let's narrow down the code to the bare essentials, i.e. with 2 labels that are not nested.
This code opens this window:
That is the expected behaviour.
Conclusion: the inherited background color of a parent presenter is not applied to a label nested in that presenter.