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

lightningcss-plugin-everywhere

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightningcss-plugin-everywhere

Lightning CSS plugin to wrap every selector in :where()

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
573
increased by101.05%
Maintainers
1
Weekly downloads
 
Created
Source

lightningcss-plugin-everywhere

Lightning CSS plugin to wrap all selectors in :where(), giving them 0 specificity.

Useful for creating unobtrusive CSS resets.

// source, 0,1,1 specificity - more than a simple class selector.
input[type="text"] {
  border: 1px solid black;
}

// output, 0,0,0 specificity - any selector will override it.
:where(input[type="text"]) {
  border: 1px solid black;
}

Usage

import { transform } from "lightningcss";
import EveryWherePlugin from "lightningcss-plugin-everywhere";

let { code } = transform({
  filename: "style.css",
  code: Buffer.from("input[type=text] { border: 1px solid black }"),
  minify: true,
  visitor: EveryWherePlugin,
});
// code === ":where(input[type=text]){border:1px solid #000}"

Keywords

FAQs

Package last updated on 06 Mar 2023

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