PHPackages                             plakart/contao-css-utilities - 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. plakart/contao-css-utilities

ActiveContao-bundle

plakart/contao-css-utilities
============================

Tailwind-style spacing utility classes assignable to Contao content elements, articles and form fields

1.0.0(2d ago)10LGPL-3.0-or-laterPHP &gt;=8.2

Since Jul 21Compare

[ Source](https://github.com/plakart/contao-css-utilities)[ Packagist](https://packagist.org/packages/plakart/contao-css-utilities)[ RSS](/packages/plakart-contao-css-utilities/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

plakart/contao-css-utilities
============================

[](#plakartcontao-css-utilities)

Tailwind-style spacing utility classes for Contao 5. Editors assign margins and paddings to content elements, articles, and form fields via four select fields — no CSS knowledge required.

How it works
------------

[](#how-it-works)

- 52 fixed classes: `mt-0…12`, `mb-0…12`, `pt-0…12`, `pb-0…12`
- Values are fluid (`clamp()`) and defined as CSS custom properties `--pcu-space-1…--pcu-space-12`, so a theme can override the scale without renaming classes
- On save, the selected classes are merged into the element's CSS class (`cssID` / `class`); manually added classes are preserved
- `utilities.css` is loaded automatically on every page; each page layout has a "Disable utility CSS" checkbox to opt out

Installation
------------

[](#installation)

```
composer require plakart/contao-css-utilities
```

Then run the Contao install tool / migrations to add the new database columns.

The four utility fields are `exclude`d by default — grant them to non-admin user groups in the Contao backend permissions before the selects appear.

Overriding the scale
--------------------

[](#overriding-the-scale)

Define the custom properties in your theme after `utilities.css` is loaded:

```
:root {
    --pcu-space-4: 1.25rem;
}
```

Development
-----------

[](#development)

```
composer test          # PHPUnit
composer phpstan       # static analysis
composer cs-fix        # code style
composer generate-css  # regenerate public/css/utilities.css (never edit by hand)
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance99

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/150e59c647719a1d7b4e60a5a8708351abdc6882732fe1dc37e363f6fd3fd9ff?d=identicon)[plakart](/maintainers/plakart)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/plakart-contao-css-utilities/health.svg)

```
[![Health](https://phpackages.com/badges/plakart-contao-css-utilities/health.svg)](https://phpackages.com/packages/plakart-contao-css-utilities)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
