Skip to content

Implement (parts of) Selectors Level 4 #66

Description

@wosc

Would be nice if has(arbitrary-selector) could be supported, for example

python -m cssutils.scripts.cssparse -s 'select fieldset:has(option[value="foo"]:checked) {}'
ERROR	Selector: Unexpected CHAR. [1:27: []
ERROR	Selector: Unexpected CHAR. [1:33: =]
ERROR	Selector: Unexpected CHAR. [1:36: ]]
ERROR	Selector: Unexpected start of pseudo. [1:38: :checked]
ERROR	SelectorList: Invalid Selector: select fieldset:has(option[value="foo"]:checked)

python -m cssutils.scripts.cssparse -s 'select fieldset:has(option:checked) {}'
ERROR	Selector: Unexpected start of pseudo. [1:28: :checked]
ERROR	SelectorList: Invalid Selector: select fieldset:has(option:checked)

# this very simple variant already works
python -m cssutils.scripts.cssparse -s 'select fieldset:has(option) {}'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions