I’ve been able to reproduce this locally, and it looks like an error in either resource resolution or the order in which styles are applied to the Text elements. I’ll need to dig a bit deeper, but I’ll keep you posted
I also get a lot of these types of errors when trying to use resources in this way:
C:\Users\eivind\Documents\Fuse\Trio5.cache\GeneratedCode\Profile.g.uno(18,28): E3102: There is nothing named 'temp' accessible in this scope. Are you missing a package reference?
Regarding your first issue, with the current implementation, it is the expected behavior. Resource bindings are not “replaced” when you override them, they are added together. This means that both bindings remain, and they will fight for initialization order. Thus what color you actually see is undefined. As this behavior is not very useful, I’ve raised an issue to get this case investigated.
Your second issue is definitely a bug, and I’ve raised another high priority issue for that one.
I guess that means that I should not define my colors as resources and hope to do anything useful with it. Especially since BasicTheme already styles a lot of stuff using resources, which means these conflicts will pop up whenever I’m unlucky.
I’ll try using ux:Global instead of ux:Key when defining my colors, or something like that
Note that you can always override the resource keys - and that is how they are meant to be used.
It doesn’t make much sense to define resources named “red”, “green” etc. Instead, define resources with semantic meaning, e.g. “ErrorColor”. Then you can override what “ErrorColor” is in a scope by defining a new resource with that key.
one problem with that logic is that you can’t define default colors then override them occasionnally. For example, I’d like all my buttons to be blue, execpt for that one which should be ErrorColor.
I think the color Resource on a specific Node should override the global default property, as it is the case with CSS