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

postcss-selector-matches

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-selector-matches

PostCSS plugin to transform :matches() W3C CSS pseudo class to more compatible CSS selectors

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is postcss-selector-matches?

The postcss-selector-matches package is a PostCSS plugin that transforms :matches() pseudo-class into a more compatible CSS selector. This allows developers to use the :matches() pseudo-class in their CSS, which can simplify complex selectors and improve readability.

What are postcss-selector-matches's main functionalities?

Transform :matches() pseudo-class

This feature transforms the :matches() pseudo-class into a more compatible CSS selector. For example, the input CSS 'a:matches(.foo, .bar) { color: red; }' will be transformed into 'a.foo, a.bar { color: red; }'. This makes the CSS more compatible with browsers that do not support the :matches() pseudo-class.

const postcss = require('postcss');
const selectorMatches = require('postcss-selector-matches');

const css = 'a:matches(.foo, .bar) { color: red; }';

postcss([selectorMatches])
  .process(css)
  .then(result => {
    console.log(result.css);
  });

Other packages similar to postcss-selector-matches

Keywords

FAQs

Package last updated on 18 Sep 2018

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