Skip to content

Update the CssSelector component documentation #3909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions components/css_selector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This gives the following output:

.. code-block:: text

descendant-or-self::div[contains(concat(' ',normalize-space(@class), ' '), ' item ')]/h4/a
descendant-or-self::div[@class and contains(concat(' ',normalize-space(@class), ' '), ' item ')]/h4/a

You can use this expression with, for instance, :phpclass:`DOMXPath` or
:phpclass:`SimpleXMLElement` to find elements in a document.
Expand All @@ -76,17 +76,15 @@ web-browser.

* link-state selectors: ``:link``, ``:visited``, ``:target``
* selectors based on user action: ``:hover``, ``:focus``, ``:active``
* UI-state selectors: ``:enabled``, ``:disabled``, ``:indeterminate``
(however, ``:checked`` and ``:unchecked`` are available)
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
``:disabled``, ``:checked`` and ``:unchecked`` are available)

Pseudo-elements (``:before``, ``:after``, ``:first-line``,
``:first-letter``) are not supported because they select portions of text
rather than elements.

Several pseudo-classes are not yet supported:

* ``:lang(language)``
* ``root``
* ``*:first-of-type``, ``*:last-of-type``, ``*:nth-of-type``,
``*:nth-last-of-type``, ``*:only-of-type``. (These work with an element
name (e.g. ``li:first-of-type``) but not with ``*``.
Expand Down