You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

icss-replace-symbols

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icss-replace-symbols

Replacing symbols during the linking phase of ICSS

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
2.8M
-5.52%
Maintainers
1
Weekly downloads
 
Created

What is icss-replace-symbols?

The icss-replace-symbols package is designed for handling Interoperable CSS (ICSS) by replacing symbols in CSS files with their corresponding values. This is particularly useful in the context of CSS Modules, where local class names and other identifiers need to be scoped locally to avoid conflicts. The package provides functionality to parse CSS files, identify symbols, and replace them with specified values, facilitating the modularization and encapsulation of CSS.

What are icss-replace-symbols's main functionalities?

Replacing symbols in CSS

This feature allows for the replacement of symbols within CSS strings. In the code sample, `icss-replace-symbols` is used to replace the symbol `header` with `header_a9x82` in a CSS string. This is useful for scoping class names locally in CSS Modules.

const replaceSymbols = require('icss-replace-symbols');
const css = ':export { header: header_c3b5x } .header { color: red; }';
const replacements = { header: 'header_a9x82' };
const result = replaceSymbols(css, replacements);
console.log(result);

Other packages similar to icss-replace-symbols

Keywords

css

FAQs

Package last updated on 21 May 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.