🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@csstools/postcss-scope-pseudo-class

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-scope-pseudo-class

The Reference Element Pseudo-class: :scope

latest
Source
npmnpm
Version
4.0.1
Version published
Maintainers
3
Created
Source

PostCSS Scope Pseudo Class PostCSS Logo

npm install @csstools/postcss-scope-pseudo-class --save-dev

PostCSS Scope Pseudo Class lets you use the :scope Pseudo-class following the Selectors 4 specification.

:scope {
	color: green;
}

/* becomes */

:root {
	color: green;
}

Usage

Add PostCSS Scope Pseudo Class to your project:

npm install postcss @csstools/postcss-scope-pseudo-class --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssScopePseudoClass = require('@csstools/postcss-scope-pseudo-class');

postcss([
	postcssScopePseudoClass(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is not preserved.

postcssScopePseudoClass({ preserve: true })
:scope {
	color: green;
}

/* becomes */

:root {
	color: green;
}
:scope {
	color: green;
}

Keywords

postcss-plugin

FAQs

Package last updated on 23 Oct 2024

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