don't overwrite background when inheriting#69
don't overwrite background when inheriting#69meowgorithm merged 3 commits intocharmbracelet:masterfrom
Conversation
|
Thanks for this! Would you mind posting a tiny bit of sample code to help explain why this makes sense? I know it might seem trivial, but it'll help expedite this. Thanks! |
From the function point of view From the user point of view, in my case that is, I was looking for a way to set a default style for an array of Style objects, we can normally achieve that using |
|
Cool, so this makes sense. Basically if a background color is set on the inheritor it shouldn’t be overridden during inheritance. Clearly just something that was overlooked. We’ll still need to vet this PR before merging, so if you have any sample code it’ll help expedite the process. |
https://gist.github.com/76creates/8f529f2b975f3cd6dee1d2a70260d53e |
|
for full example check out https://github.com/76creates/stickers |
🤯 Nice work on stickers! |
|
Thanks again for this. It's awesome seeing some good use of inheritance on stickers. |
no, no, thank you folks for making such an awesome lib to begin with ⚡ |
It's contra intuitive that
backgroundKeyis the only key that is always inherited.