Skip to content

What is this tuiMode all about? #1531

Answered by waterplea
loxy asked this question in Q&A
Mar 19, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

Well, there are few point to mention:

  • Not everything can be just a CSS variable override, sometimes components need to know that they are in the night mode or not, for example to enable shadow or add border. This might be solved by host-context, but read further
  • Mode directive is used to create localised dark themes. For example if you have a promotional banner with dark photo and some email input and subscribe button on top. Overall site can be light, but a particular section has to be dark.
  • Those sections can have any level of nesting and with host-context once there is one dark section all children will be dark, no way to override it
  • Sometimes you want them to propagate across DI tree…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@loxy
Comment options

@waterplea
Comment options

Answer selected by waterplea
Comment options

You must be logged in to vote
3 replies
@waterplea
Comment options

@loxy
Comment options

@waterplea
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants