Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

Version published
Weekly downloads
2.7M
increased by0.02%
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

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

  • 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