Grigorii K. Shartsev
Grigorii K. Shartsev
Fixed TS config for styleguidist (see the last commit)
Force-pushed docs fixes according to @susnux suggestions
/backport to next
> Those two sentences are incorrect They are still correct. If you use `matchMedia` - you are losing Nextcloud settings. If you are using Nextcloud settings - you are losing...
> Small addition, considering the method takes an HtmlElement, we also use the `[data-theme-dark]` attribute to scope down some element and enforce dark theme. > So specifying an element should...
> > You must always check both. > > No, user setting will overrule matchMedia. https://github.com/nextcloud/server/blob/381077028adf388a7081cf42026570c6be47b198/apps/theming/lib/Service/ThemeInjectionService.php#L34-L61 Then this is not correct? > This should do the trick just fine: >...
> But feels incredibly hackish. I'd like to use proper logic instead of relying on custom css queries. Especially considering `--background-invert-if-dark` have been designed to be removed in the future...
> Well, we return the user setting first, then check the system settings ? This is exactly what I wrote ? 🤔 In one comment - yes, you propose to...
> should be efficient enough 😁 Ok, maybe you are right here. Probably `el.closest()` is even more performant. But it would still require for additional `matchMedia` check, otherwise the system...
> Maybe my var names are confusing, `darkModeSetting` is the theming app user config. `darkModePreference` is the system preference. Yes, and according to your code, we still need both. That's...