Socket
Socket
Sign inDemoInstall

postcss-attribute-case-insensitive

Package Overview
Dependencies
7
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postcss-attribute-case-insensitive

Enable support for case insensitive attribute matching in selectors


Version published
Weekly downloads
6.1M
increased by0.21%
Maintainers
3
Install size
211 kB
Created
Weekly downloads
 

Package description

What is postcss-attribute-case-insensitive?

The postcss-attribute-case-insensitive npm package is a plugin for PostCSS, a tool for transforming CSS with JavaScript. This plugin allows you to write attribute selectors in CSS that are case-insensitive, making your CSS more flexible and easier to maintain. It follows the W3C specification for case-insensitive attribute selectors, enabling developers to target attributes without worrying about the case sensitivity of their values.

What are postcss-attribute-case-insensitive's main functionalities?

Case-insensitive attribute selectors

This feature allows you to select elements based on their attributes in a case-insensitive manner. For example, it enables `[href='example.com' i]` to match both `href='example.com'` and `href='Example.com'`. This is particularly useful when dealing with user-generated content or integrating with systems that are not case-sensitive.

[attr=value i] { /* styles */ }

Other packages similar to postcss-attribute-case-insensitive

Readme

Source

PostCSS Attribute Case Insensitive PostCSS Logo

npm version CSS Standard Status Build Status Discord

PostCSS Attribute Case Insensitive enables support for Case Insensitive Attribute matching in selectors.

[frame=hsides i] {
	border-style: solid none;
}

/* becomes */

[frame=hsides],[frame=Hsides],[frame=hSides],[frame=HSides],[frame=hsIdes],[frame=HsIdes],[frame=hSIdes],[frame=HSIdes],[frame=hsiDes],[frame=HsiDes],[frame=hSiDes],[frame=HSiDes],[frame=hsIDes],[frame=HsIDes],[frame=hSIDes],[frame=HSIDes],[frame=hsidEs],[frame=HsidEs],[frame=hSidEs],[frame=HSidEs],[frame=hsIdEs],[frame=HsIdEs],[frame=hSIdEs],[frame=HSIdEs],[frame=hsiDEs],[frame=HsiDEs],[frame=hSiDEs],[frame=HSiDEs],[frame=hsIDEs],[frame=HsIDEs],[frame=hSIDEs],[frame=HSIDEs],[frame=hsideS],[frame=HsideS],[frame=hSideS],[frame=HSideS],[frame=hsIdeS],[frame=HsIdeS],[frame=hSIdeS],[frame=HSIdeS],[frame=hsiDeS],[frame=HsiDeS],[frame=hSiDeS],[frame=HSiDeS],[frame=hsIDeS],[frame=HsIDeS],[frame=hSIDeS],[frame=HSIDeS],[frame=hsidES],[frame=HsidES],[frame=hSidES],[frame=HSidES],[frame=hsIdES],[frame=HsIdES],[frame=hSIdES],[frame=HSIdES],[frame=hsiDES],[frame=HsiDES],[frame=hSiDES],[frame=HSiDES],[frame=hsIDES],[frame=HsIDES],[frame=hSIDES],[frame=HSIDES] {
	border-style: solid none;
}

Usage

Add PostCSS Attribute Case Insensitive to your project:

npm install postcss postcss-attribute-case-insensitive --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssAttributeCaseInsensitive = require('postcss-attribute-case-insensitive');

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

PostCSS Attribute Case Insensitive runs in all Node environments, with special instructions for:

NodePostCSS CLIWebpackCreate React AppGulpGrunt

Keywords

FAQs

Last updated on 08 Jul 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc