fom / module-setup-fixtures-cms-hyva-tailwind-jit
Hyvä CMS Tailwind JIT CSS adapter for the FriendsOfMagento setup-fixtures CMS installer.
Package info
github.com/FriendsOfMagento/module-setup-fixtures-cms-hyva-tailwind-jit
Type:magento2-module
pkg:composer/fom/module-setup-fixtures-cms-hyva-tailwind-jit
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- fom/module-setup-fixtures: ^1.0
- fom/module-setup-fixtures-cms: ^1.0
- hyva-themes/magento2-cms-tailwind-jit: ^2.0.0
- magento/framework: ^103.0.7
This package is auto-updated.
Last update: 2026-08-23 20:06:45 UTC
README
Optional Hyvä CMS Tailwind JIT integration for FriendsOfMagento Setup Fixtures CMS.
The module adds Hyvä's is_tailwindcss_jit_enabled and tailwindcss fields to CMS page
and block fixtures. A CSS sidecar contains already compiled, entity-scoped CSS. The adapter
normalizes the placeholder entity ID, resolves the themes used by the fixture's store scope,
and persists the complete theme-to-CSS map through Hyvä's repository.
This module does not compile Tailwind source.
Installation
A licensed Hyvä package repository must already be configured in the consuming project.
composer require fom/module-setup-fixtures-cms-hyva-tailwind-jit bin/magento module:enable Fom_SetupFixturesCmsHyvaTailwindJit bin/magento setup:upgrade
The first import is safe when the covered stores do not use a Hyvä theme yet. The CMS
entity is installed, no CSS rows are stored, and the fixture hash represents an empty Hyvä
theme set. Assign the Hyvä theme and run bin/magento setup:fixtures:import (or
setup:upgrade) again. The second run detects the changed theme set and persists the CSS
without changing the fixture.
Direct dependencies are:
fom/module-setup-fixtures:^1.0fom/module-setup-fixtures-cms:^1.0hyva-themes/magento2-cms-tailwind-jit:^2.0.0magento/framework:^103.0.7
Supported versions
Magento 2
Magento 2.4.4–2.4.6 and PHP 8.1 are not supported.
| Magento | PHP |
|---|---|
| 2.4.7 | 8.2, 8.3 |
| 2.4.8 | 8.3, 8.4 |
| 2.4.9 | 8.5 |
The consuming Magento metapackage controls the exact security patch. Hyvä compatibility is
bounded to the 2.x CMS Tailwind JIT API family. Version 2.0.0 introduced both
ScopedCssNormalizer and the unified scoped-CSS behavior used by this adapter.
Mage-OS
| Mage-OS | PHP | Magento base |
|---|---|---|
| 3.4.0 | 8.3, 8.4, 8.5 | 2.4.9 |
Mage-OS 3.4 replaces the Magento 2.4.9 framework and store component packages, so the
existing direct dependency constraints support both distributions. The complete package
set, including hyva-themes/magento2-cms-tailwind-jit:^2.0.0, resolves on Mage-OS 3.4.
See the Mage-OS release policy and
system requirements.
Fixture contract
Add the Hyvä enablement field to the JSON fixture and place compiled CSS beside it:
{
"identifier": "home",
"title": "Home Page",
"is_active": true,
"is_tailwindcss_jit_enabled": true,
"stores": {
"mode": "all"
},
"content_file": "home.html",
"tailwindcss_file": "home.css"
}
.hcms-page-0 .flex { display: flex; }
Use .hcms-page-0 for new page fixtures and .hcms-block-0 for new block fixtures.
Hyvä's normalizer replaces the placeholder with the persisted entity ID.
Sidecar behavior is deterministic:
- No
tailwindcss_fileand no default sibling CSS file: existing stored CSS is unmanaged. - Explicit
tailwindcss_filethat does not exist: fixture validation fails. - Explicit or implicit existing empty CSS file: all stored CSS for the entity is cleared.
- Nonempty CSS with no Hyvä theme in the store scope: persistence is deferred until a Hyvä theme is assigned and fixtures are imported again.
- Nonempty CSS replaces the complete stored theme map, removing themes no longer in scope.
See usage, architecture, and best practices.
License
Licensed under the Open Software License 3.0.