Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@assortment/darkmodejs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assortment/darkmodejs - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "@assortment/darkmodejs",
"version": "0.0.1",
"version": "0.0.2",
"description": "Utility package for managing Dark Mode on the web",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,5 +6,4 @@ # darkmodejs

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/assortment/darkmodejs.svg)](https://github.com/assortment/darkmodejs/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/assortment/darkmodejs.svg)](https://github.com/assortment/darkmodejs/pulls)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
[![npm](https://img.shields.io/npm/v/@assortment/darkmodejs.svg)](https://www.npmjs.com/package/@assortment/darkmodejs)

@@ -21,2 +20,5 @@ </div>

![Example application using darkmodejs in Windows 10 Firefox](https://i.imgur.com/ZR2aGIE.gif)
_Example application using darkmodejs in Windows 10 Firefox_
## 📝 Prerequisites

@@ -117,4 +119,27 @@

## 🎬 Examples
The following examples are taken from `darkmodejs-demo`, a demo application created to show how you can use `@assortment/darkmodejs` in conjunction with [Emotion Theming](https://emotion.sh/docs/theming) to control your website's theme based on a user's OS preference.
- 💻 Code: https://github.com/Assortment/darkmodejs-demo
- 🌐 URL: https://darkmodejs-demo.netlify.com/
### Windows 10:
#### Firefox (supported)
![Supported in Windows 10 with Firefox](https://i.imgur.com/ZR2aGIE.gif)
#### Chrome (not supported until Chrome 76)
![Not supported in Windows 10 with Chrome 75](https://i.imgur.com/C6pyZVr.gif)
### No preference
Special mention to `no-preference`. To my knowledge I don't believe any Operating System currently allows for a no preference option, so there's no current circumstance where this returns true from a `prefers-color-scheme` media query. That said, [as its part of the specification](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) I've included it as an option in the demo app if you ever want to do anything specific.
![Example no preference theme set](https://i.gyazo.com/5555e2439eadfcf80e184b7a4434fbc5.png)
## ✍️ License
MIT © [Luke Whitehouse](https://lukewhitehouse.co.uk)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc