When the darkmode is on, the page should immediately be displayed dark, but it currently starts as normal and transitions to the dark state. Probably related to bcc8f50658.
When the darkmode is on, the page should immediately be displayed dark, but it currently starts as normal and transitions to the dark state. Probably related to bcc8f50658cee1338732efe71401e28d577cffc2.
The blinking still persists even when the transition is removed (even though less noticeable) (see gs/darkmode-fix) because JS doesn't execute fast enough. The only real solution would be server-side solution and the only thing I can think of is a special language, which would somehow inherit translations from the already existing languages and there would be a {{ T }} call inside a <style> element which would add the respective colour. IMHO hacky af.
The blinking still persists even when the transition is removed (even though less noticeable) (see [gs/darkmode-fix](https://gitlab.com/patek-devs/patek.cz/-/compare/master...gs%2Fdarkmode-fix)) because JS doesn't execute fast enough. The only real solution would be server-side solution and the only thing I can think of is a special language, which would somehow inherit translations from the already existing languages and there would be a `{{ T }}` call inside a `<style>` element which would add the respective colour. IMHO hacky af.
Well. The problem is, that the JavaScript has to be called inside the DOMContentLoaded callback, because otherwise, the element we want to add the class to doesn't yet exist. Is there another way to do this?
Well. The problem is, that the JavaScript has to be called inside the DOMContentLoaded callback, because otherwise, the element we want to add the class to doesn't yet exist. Is there another way to do this?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When the darkmode is on, the page should immediately be displayed dark, but it currently starts as normal and transitions to the dark state. Probably related to
bcc8f50658.I extracted it from #3 as this should be relatively easy to fix while we are waiting for anyone (@Dejwut) to actually create the darkmode button.
created branch
gs/darkmode-fixto address this issueThe blinking still persists even when the transition is removed (even though less noticeable) (see gs/darkmode-fix) because JS doesn't execute fast enough. The only real solution would be server-side solution and the only thing I can think of is a special language, which would somehow inherit translations from the already existing languages and there would be a
{{ T }}call inside a<style>element which would add the respective colour. IMHO hacky af.changed the description
Cannot we make use of synchronous JavaScript? So that it is executed before anything else moves on? Or is it even possible?
Well. The problem is, that the JavaScript has to be called inside the DOMContentLoaded callback, because otherwise, the element we want to add the class to doesn't yet exist. Is there another way to do this?
https://gitlab.com/patek-devs/patek.cz/-/issues/11#note_330499518 <- this applies here too.
mentioned in commit
7bc21cb434mentioned in merge request !14
closed via merge request !14
mentioned in commit
897eb88bec