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

dark-mode-toggle

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dark-mode-toggle - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

4

package.json
{
"name": "dark-mode-toggle",
"version": "0.7.1",
"version": "0.7.2",
"description": "Web Component that toggles dark mode ๐ŸŒ’",

@@ -37,3 +37,3 @@ "main": "src/dark-mode-toggle.mjs",

"devDependencies": {
"eslint": "^7.3.0",
"eslint": "^7.5.0",
"eslint-config-google": "^0.14.0",

@@ -40,0 +40,0 @@ "http-server": "^0.12.3",

@@ -207,7 +207,27 @@ # `<dark-mode-toggle>` Element

You can style the custom element with [`::part()`](https://developer.mozilla.org/en-US/docs/Web/CSS/::part).
Additionally, you can use a number of exposed CSS variables.
See the demo's
[CSS source code](https://github.com/GoogleChromeLabs/dark-mode-toggle/blob/master/demo/common.css)
for some concrete examples.
The exposed parts and their names can be seen below:
```html
<form part="form">
<fieldset part="fieldset">
<legend part="legend"></legend>
<input part="lightRadio" id="l" name="mode" type="radio">
<label part="lightLabel" for="l"></label>
<input part="darkRadio" id="d" name="mode" type="radio">
<label part="darkLabel" for="d"></label>
<input part="toggleCheckbox" id="t" type="checkbox">
<label part="toggleLabel" for="t"></label>
<aside part="aside">
<input part="permanentCheckbox" id="p" type="checkbox">
<label part="permanentLabel" for="p"></label>
</aside>
</fieldset>
</form>
```
Additionally, you can use a number of exposed CSS variables, as listed in the following:
| CSS Variable Name | Default | Description |

@@ -214,0 +234,0 @@ | ----------------- | ------- | ----------- |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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