-
Hi! I tried to understand more of the controller principle, like described here and here. And I like it. But I do not really understand how this concepts is transported to Seems that this component is some kind of glue. But for me Your solution only excepts two different kind of modes (ok, there is also this null). So, it mainly looks like a night mode. And also very complicated for implementing a light/dark design. The same could be archived with simply adding some selector to your elements with some mechanism for automation if you need. Something like: :root, .on-light, [data-theme] {
// your color definition
}
.on-dark, [data-theme=onDark] {
// your re-defined color definitions
}
.on-purple, [data-theme=onPurple] {
// another style
} You can still apply your theme injection method like via I'm lost. What is this Best regards, P.S. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Well, there are few point to mention:
|
Beta Was this translation helpful? Give feedback.
-
You are right. Example 2 is not working together with host-context because specificity would then take over over proximity. And in that case the source order (the last host-context you specify) would be the relevant part. Damn. And I have no concerns. Just want to understand how it works and how it can be useful for me. For the documentation we can create our own frame. No problem. But I have another question. Sorry when I'm annoying... In most of your components you use the host: {
'($.data-mode.attr)': 'mode$',
}, But in some components you use another approach (for example @HostBinding('attr.data-mode')
get hostMode(): TuiBrightness | null {
return this.modeDirective && this.modeDirective.mode;
} Why? It seems it has the same effect at the end (but first one is dynamic)... |
Beta Was this translation helpful? Give feedback.
Well, there are few point to mention: