Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Attribute selector's case-sensitivity identifier `s`

Open
#309 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css, javascript
Domain
frontend, tooling

Research direction

Start by reproducing the three attribute-selector examples from the issue and inspect how attribute case-sensitivity flags are parsed. Done means the s identifier is recognized distinctly from unknown flags while preserving the existing i behavior, with a regression test covering these cases.

Written by the indexing model from the issue text.

Description

According to the CSS Selectors Level 4 specification, the Case-sensitivity identifiers are i and s.

However, it seems that postcss-selector-parser(v7.1.0) does not support s.

import parser from 'postcss-selector-parser';

const transform = (selectors: parser.Root) => {
	selectors.walkAttributes((attr: parser.Attribute) => {
		console.log(attr);
	});
};

const processor = parser(transform);
processor.processSync('[class="foo" i] {}'); // { ..., insensitive: true, raws: { value: '"foo"' }, ... }
processor.processSync('[class="foo" s] {}'); // { ..., insensitive: false, raws: { value: '"foo"', insensitiveFlag: 's' }, ... }
processor.processSync('[class="foo" xxx] {}'); // { ..., insensitive: false, raws: { value: '"foo"', insensitiveFlag: 'xxx' }, ... }
Dominant language
JavaScript
Stars
214
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from postcss/postcss-selector-parser

All issues in postcss/postcss-selector-parser

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.