textual icon indicating copy to clipboard operation
textual copied to clipboard

Clarify in the docs the order in which `CSS` and `CSS_PATH` are processed

Open davep opened this issue 3 years ago • 1 comments

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.

davep avatar Oct 13 '22 15:10 davep

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.

davep avatar Oct 17 '22 13:10 davep

Should be covered by https://github.com/Textualize/textual/issues/1010 / https://github.com/Textualize/textual/pull/1079?

darrenburns avatar Nov 02 '22 09:11 darrenburns

Absolutely does, and then some!

davep avatar Nov 02 '22 13:11 davep

Did we solve your problem?

Glad we could help!

github-actions[bot] avatar Nov 02 '22 13:11 github-actions[bot]