Skip to content

Attribute selector's case-sensitivity identifier s #309

@SaekiTominaga

Description

@SaekiTominaga

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' }, ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions