blob: 33ba1ace2063315cf885cb20ae25647f64025284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import { whitespace } from "../../var/whitespace.js";
import { identifier } from "./identifier.js";
// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
export var attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
// Operator (capture 2)
"*([*^$|!~]?=)" + whitespace +
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
whitespace + "*\\]";
|