New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@oddbird/css-toggles

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oddbird/css-toggles

Polyfill for the proposed CSS Toggles syntax

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
105
decreased by-15.32%
Maintainers
3
Weekly downloads
 
Created
Source

CSS Toggles preview

  • Demo
  • Explainer
  • Draft Spec

Polyfill Installation

Download a copy

The simplest, recommended way to install the polyfill is to copy it into your project.

Download css-toggles.min.js from unpkg.com and add it to the appropriate directory in your project. Then, include it where necessary with a <script> tag:

<script src="/path/to/css-toggles.min.js" type="module"></script>

You can also use an IIFE version if your target browsers require it:

<script src="/path/to/css-toggles.iife.min.js"></script>

With npm

For more advanced configuration, you can install with npm:

npm install @oddbird/css-toggles

After installing, you’ll need to use appropriate tooling to use node_modules/@oddbird/css-toggles/dist/css-toggles.js (or .min.js).

Via CDN

For prototyping or testing, you can use the npm package via a Content Delivery Network. Avoid using JavaScript CDN’s in production, for many good reasons such as performance and robustness.

<script
  src="https://cdn.jsdelivr.net/npm/@oddbird/css-toggles@latest"
  crossorigin="anonymous"
  defer
></script>

Usage

After installation the polyfill will automatically parse all stylesheets present in the HTML document (both inline and linked) for the proposed CSS Toggles syntax. Once the styles are parsed the toggling behavior will be polyfilled with JavaScript.

Contributing

Visit our contribution guidelines.

Keywords

FAQs

Package last updated on 25 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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