Recent submissions

Comment · 6 years ago
Oh! Thanks for that, I'll fix the typo when I've got time
Comment · 6 years ago
You'll have a callback on the next version. I plan a lot of tweaks and features that can hardly be done only in CSS, moreover the plan is to give devs an easy way to do dark-modes. I understand the divergences and critics but want to try things as a student. I thanks you a lot for your review.
Comment · 6 years ago
There already is a github page demo, look at the description of the github project or at the "Demo available" badge. I'll probably change the demo in the next update, it is too simple and ugly. Thanks for the feedback.
Comment · 6 years ago
I understand the concept of what you are doing, but I think those two methods have different use cases, yours may be more performant but mine, I feel, is more simple for everyday usage. I'll definitly look your work more in depth. Thanks for the feedback!
Comment · 6 years ago
This API do not invert colors, it uses CSS variables and classes for more customization. No mix-blend-mode or anything. The demo has been done quickly this afternoon, I'll probably change it for the next version.
Comment · 6 years ago
You have a badge "Demo Available" too, I'll maybe do a more clear link.
Comment · 6 years ago
I'll do that for the next version, it is already planned, thanks for the feedback!
Comment · 6 years ago
Darkmode.js uses `mix-blend-mode` to invert the colors on the pages and offer a class based custom style system.

Here you also have the class based custom styles but also have a CSS variables based styling system. You can chose what value will take a variable depending on the current state of the darkmode.

See the readme of the github page for more informations, ask again if you need additional informations.

Comment · 6 years ago
It makes the creation and management of dark modes simpler, by giving you a simple API to work with.

It does not use `prefer-color-scheme` for now but I'm planning to add the option later.

Comment · 6 years ago
Thanks, feel free to give feedback, submit issues and contribute if you want!
Comment · 6 years ago
The use case is different, the standard CSS `prefers-color-scheme` media feature changes the styles according to your system preferences. Here, the goal is to offer to the developer a simple API to create a customizable darkmode feature. I've just started writing this API but I intend to make it more customizable by including `prefers-color-scheme` option and timestamps based darkmode.

I hope it make the thing more clear.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton