css-what
a CSS selector parser
Example
API
CSSwhat(selector, options)
- Parses str
, with the passed options
.
The function returns a two-dimensional array. The first array represents selectors separated by commas (eg. sub1, sub2
), the second contains the relevant tokens for that selector. Possible token types are:
name | attributes | example | output |
---|---|---|---|
|
|
|
|
| - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| - |
|
|
| - |
|
|
| - |
|
|
| - |
|
|
| - |
|
Options:
xmlMode
: When enabled, tag names will be case-sensitive (meaning they won't be lowercased).
License: BSD-2-Clause
Last updated