Skip to content

Commit

Permalink
reworded explanations of css:theme and css:content
Browse files Browse the repository at this point in the history
  • Loading branch information
pigeonflight committed Oct 10, 2016
1 parent eac3cb1 commit a8f2663
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions theming/ttw-advanced_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ Exercise 2 - viewing the unthemed site
- ``<replace>`` replaces the theme element with the content element,
- ``<drop>`` removes the content or the theme element.

You use ``css:theme`` to specify CSS selector corresponding to the targeted element in the theme, and ``css:content`` to specifiy the CSS selector corresponding to the content element to display.
The ``css:theme`` attribute specifies a CSS expression used to match elements in the theme, and ``css:content`` specifies a CSS selector which matches elements in the content.

Similarly, you can use ``css:theme-children`` and ``css:content-children`` to target the element's children.
Similarly, you can use ``css:theme-children`` and ``css:content-children`` to target the matched element's children.

.. note:: sometimes CSS selectors are not powerful enough, and you can use XPath selectors (using ``theme`` and ``content``).

Expand All @@ -116,17 +116,14 @@ To apply a rule conditionally, you use ``css:if-theme`` and ``css:if-content`` (
You can also create conditions about the current path using ``if-path``.


Exercise 3 - the <notheme> and <drop> directives
Exercise 3 - the <drop> directives
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1. Add a rule that drops the "search section" checkbox from the search box.
See the diagram below:

.. image:: ../theming/_static/theming-dropping-thesearchsection.png

2. Disable the theme when the news section is visited

blah blah

Directive attributes
^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit a8f2663

Please sign in to comment.