Test adding a variable via preprocessing
This commit is contained in:
parent
4953744c30
commit
49e8a99e36
|
@ -5,6 +5,13 @@
|
||||||
* Functions to support theming in the Tailwind CSS theme.
|
* Functions to support theming in the Tailwind CSS theme.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_preprocess_HOOK().
|
||||||
|
*/
|
||||||
|
function tailwindcss_preprocess_html(&$variables) {
|
||||||
|
$variables['attributes']['class'][] = 'tw-bg-red-200';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_preprocess_HOOK().
|
* Implements hook_preprocess_HOOK().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,5 +7,6 @@ mix.postCss('src/main.css', 'dist', [
|
||||||
])
|
])
|
||||||
.purgeCss({
|
.purgeCss({
|
||||||
folders: ['templates'],
|
folders: ['templates'],
|
||||||
extensions: ['html', 'twig']
|
extensions: ['html', 'twig'],
|
||||||
|
whitelistPatterns: [/tw-bg-red-200/]
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue