Skip to content

Commit

Permalink
feature #3909 Update the CssSelector component documentation (stof)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Update the CssSelector component documentation

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all (or 2.3+)
| Fixed tickets | n/a

This updates the CssSelector component for changes done in Symfony 2.3. The rewritten component supports more pseudo-classes

Commits
-------

7db0c58 Update the CssSelector component documentation
  • Loading branch information
weaverryan committed Jun 7, 2014
2 parents 5e0e119 + 7db0c58 commit 32b9058
Showing 1 changed file with 3 additions and 5 deletions.
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

0 comments on commit 32b9058

Please sign in to comment.