Search by

skom / stylex-connector

Starraider

StyleX Connector - Bridges StyleX build-time CSS authoring with TYPO3 Fluid templates.

Package info

github.com/Starraider/stylex-connector

Type:typo3-cms-extension

pkg:composer/skom/stylex-connector

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-10-03 10:51 UTC

This package is auto-updated.

Last update: 2026-10-04 08:09:53 UTC


README

StyleX Connector logo

StyleX Connector makes classes compiled by StyleX available in TYPO3 Fluid templates. A sitepackage registers a JSON manifest produced by its frontend build. The {stylex:class(...)} ViewHelper composes supported static conflict maps, including null clearing, or looks up complete class recipes. Recipes concatenate without conflict resolution; dynamic class-plus-variable styles need a consumer adapter.

The extension targets TYPO3 12.4, 13.4, and 14.3 or later in the 14.x line. PHP 8.1 is supported with TYPO3 12.4; TYPO3 13.4 and 14.3 require PHP 8.2 or later. The extension currently limits its PHP support to 8.4. It does not compile StyleX source files or serve the generated CSS.

TYPO3 12.4 is in ELTS. Production installations on that line need a current patched ELTS core release.

Documentation

Start with the installation guide. It covers dependencies, the Vite build and both manifests, TYPO3 registration, asset delivery, and verification in order.

Minimal example

After the package is registered on Packagist, install the extension in the TYPO3 project:

composer require skom/stylex-connector

Register the build's StyleX manifest in the sitepackage's ext_localconf.php:

\Vendor\StylexConnector\Configuration\StylexRegistry::registerManifest(
    'my_sitepackage',
    'EXT:my_sitepackage/Resources/Public/StylexManifest/stylex-manifest.json'
);

After the frontend build creates that file and the page includes its CSS, use a manifest key in Fluid:

<button class="{stylex:class(styles: 'Button.root')}">Save</button>

Until then, add the Git repository as a Composer VCS repository and require skom/stylex-connector:dev-main in a test project. Follow the installation guide for the required build and asset setup around this example.

Upgrades

The current improvements retain v1 manifests and both PHP namespaces. The maintained optional Vite adapter emits v2 manifests with stable keys and paired CSS hashes. Use vendor/bin/typo3 stylex:validate --required-key Button.root before deployment. Deploy matching CSS and manifests together and flush dependent page caches. See upgrade notes for precedence and deprecated CSS controls. See the changelog for release notes.

Privacy and data handling

StyleX Connector reads local JSON manifests and caches their style keys and CSS class names in TYPO3's cache. It does not collect, store, or transmit personal data. Flushing TYPO3 caches deletes the cached manifest data. No privacy-specific configuration or retention schedule is needed for the connector itself; the host site remains responsible for its own data handling.

Issues and security

Report bugs and ask questions through GitHub issues. Send suspected security vulnerabilities privately to sven@skom.de instead of opening a public issue.

License

This project is licensed under the GNU General Public License v2.0 or later.