Call_in
Show HN: Lyt – A flexible and highly configurable CSS layout library
Re:Show HN: Darken – Darkmode Made Easy
on Friday January 17, 2020 @07:12AM (#22073976)
Oh! Thanks for that, I'll fix the typo when I've got time
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @10:38PM (#22071644)
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.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @09:33PM (#22071346)
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.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @09:20PM (#22071276)
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!
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @08:42PM (#22071091)
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.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @08:37PM (#22071059)
You have a badge "Demo Available" too, I'll maybe do a more clear link.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @07:53PM (#22070777)
I'll do that for the next version, it is already planned, thanks for the feedback!
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @07:52PM (#22070773)
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.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @07:40PM (#22070699)
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.
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @07:38PM (#22070682)
Thanks, feel free to give feedback, submit issues and contribute if you want!
Re:Show HN: Darken – Darkmode Made Easy
on Thursday January 16, 2020 @07:37PM (#22070671)
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.