textual
textual copied to clipboard
Clarify in the docs the order in which `CSS` and `CSS_PATH` are processed
In the App Basics section of the docs the use of a CSS file is introduced, followed by the use of a CSS classvar as a quick way of styling an application component. It's possible that someone reading the documentation may wonder which is processed if both are used (it's already confirmed both are), and subsequently what order they are processed in.
The thinking here is that it's possible that someone may provide a CSS classvar with the expectation that they can override or refine it later with a CSS file, etc.
So: double-check what order this happens in and include this in the documentation so the reader can be sure.
Quickly testing this, it would appear that the CSS classvar wins over something loaded via the CSS_PATH; in local discussion we feel it should be the other way round.
Should be covered by https://github.com/Textualize/textual/issues/1010 / https://github.com/Textualize/textual/pull/1079?
Absolutely does, and then some!
Did we solve your problem?
Glad we could help!