PHPackages                             ether/critical - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ether/critical

ActiveCraft-plugin

ether/critical
==============

A Critical CSS generator for Craft CMS

0.0.1-alpha.5(7y ago)2661[4 issues](https://github.com/ethercreative/critical/issues)proprietaryPHP

Since Oct 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ethercreative/critical)[ Packagist](https://packagist.org/packages/ether/critical)[ RSS](/packages/ether-critical/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (4)Versions (5)Used By (0)

Let's Get Critical
==================

[](#lets-get-critical)

A Critical CSS generator for Craft CMS.

Usage
-----

[](#usage)

Add the `critical-css` hook to your head tag:

```

    {# ... #}

    {% hook 'critical-css' %}

    {# ... #}

```

Wrap anything you consider to be above the fold with fold tags:

```
{% fold %}

...

{% endfold %}
```

The fold tag supports an If statement, useful when using the tag in a loop:

```
{% for block in entry.pageContent %}
    {% fold if loop.index
