diazo theme apply multiple themes

Multiple, conditional themes

It’s possible to specify multiple themes using conditions. For instance:

<theme href="theme.html"/>
<theme href="news.html" css:if-content="body.section-news"/>
<theme href="members.html" css:if-content="body.section-members"/>

Potential themes are tested in the order specified. The first one to match is used.

The unconditional theme is used as a fallback when no other theme’s condition is satisfied. If no unconditional theme is specified, the document is passed through without theming.

It is also possible to conditionally disable theming, using <notheme />:

<theme href="theme.html"/>
<notheme if-path="/assets" />

The theme is disabled if there is a matching <notheme />, regardless of any conditional <theme /> directives.

All rules are applied to all themes. To have a rule apply to only a single theme, use the condition grouping syntax:

<rules css:if-content="body.section-news">
    <theme href="news.html"/>
    <copy css:content="h2.articleheading" css:theme="h1"/>
</rules>
设置