parsel icon indicating copy to clipboard operation
parsel copied to clipboard

A tiny, permissive CSS selector parser

Results 14 parsel issues
Sort by recently updated
recently updated
newest added

The index.d.ts isn't being included in the published module, so the types don't work when imported to a typescript project. ![image](https://user-images.githubusercontent.com/1910070/182072102-91ec5f86-0f18-48df-8cc7-dffc5c6e0186.png) ![image](https://user-images.githubusercontent.com/1910070/182072198-31e2d20b-f132-49fe-ab25-aed7d62df9e8.png)

Hi! Thank you so much for this. I found a bug when using Tailwind. Selector: `.mb-\[max\(-70\%\2c -23rem\)\]` returns token: ``` [ { "type": "class", "content": ".mb-\\[max\\(¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶", "name": "mb-\\[max\\(¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶", "pos": [...

so I have this selector here footprint[uid="ca135f26-2b55-db63-7451-5a8effb2a19f"] > pad[uid="100a8763-0d5f-de60-23a5-00d74f3ecad7"] and oddly it returns a § as value for the right side attribute full response: ``` { "type": "complex", "combinator": ">",...

This pull request is an attempt to solve this issue https://github.com/LeaVerou/parsel/issues/27 I have constructed this by recursively computing the AST generated from `parsel.parse` ### Changes done on other API -...

Hi! I would like to use Parsel to modify selectors and would need a `stringify` method for this that turns a list of tokens or AST back to a string....

Repro: ```bash mkdir test && cd test npm init -y && npm i parsel-js echo 'import parsel from "parsel-js"' > index.mjs node index.mjs (node:32143) Warning: To load an ES module,...

Given the input `[foo=ss][bar=ii]` I'd expect two-letter value for each attribute selector. Instead, one letter is interpreted as the case sensitivity modifier. From a brief look I can't find any...

bug

Hi, first thanks for your excellent library ! I found a strange behaviour when using attribute selectors: ```css a[attr="abcde"][attr="123"] ``` [link](https://projects.verou.me/parsel/?selector=a%5Battr%3D%22abcde%22%5D%5Battr%3D%22123%22%5D) The second attribute returns: ```json { "type": "attribute", "content":...

See example 59 from https://www.w3.org/TR/selectors-4/#specificity-rules > `:nth-child(even of li, .item)` has a specificity of `(0,2,0)`—like a class selector (`.item`) plus a pseudo-class—when matched against any of ``, ``, or ``....

enhancement

Awesome project and blog post! I look forward to your Almanac research and its results 👍 What follows is likely not common usage, and not observable in pure CSS, but...