PHPackages                             fritzmg/contao-mergecssclasses - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fritzmg/contao-mergecssclasses

AbandonedArchivedContao-module[Utility &amp; Helpers](/categories/utility)

fritzmg/contao-mergecssclasses
==============================

Small extension for Contao to automatically merge CSS classes in included elements

1.0.0(11y ago)170GPL-2.0PHPPHP &gt;=5.2

Since Jun 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/fritzmg/contao-mergecssclasses)[ Packagist](https://packagist.org/packages/fritzmg/contao-mergecssclasses)[ Docs](http://www.inspiredminds.at)[ RSS](/packages/fritzmg-contao-mergecssclasses/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![](https://camo.githubusercontent.com/d38910dbe42bf5fc714c24bf713dad29cb66517c57bc83c372c7c2dafc8434af/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323031352e737667)](https://github.com/fritzmg/contao-mergecssclasses)[![](https://camo.githubusercontent.com/2b9e9360458f9889557c79c23871e537ed1ecbeb1e05d016735fbf767b100d35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667269747a6d672f636f6e74616f2d6d65726765637373636c61737365732e737667)](https://packagist.org/packages/fritzmg/contao-mergecssclasses)[![](https://camo.githubusercontent.com/a0ffc5a37b0caefba40cafc79b7a19488e1b8f22e1fd51616e9b03ead8db4932/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667269747a6d672f636f6e74616f2d6d65726765637373636c61737365732e737667)](https://packagist.org/packages/fritzmg/contao-mergecssclasses)

Contao Merge CSS Classes
========================

[](#contao-merge-css-classes)

Small extension for Contao to automatically merge CSS classes in included elements.

By default, Contao ignores the CSS ID and class values defined in an element, when it is included via an include Content Element. So if you defined a CSS class in a module for example and then integrated this module via a Content Element on your page, its CSS class will not be used. Instead you have to define a CSS class in the Content Element itself.

You can change that behavior with this extension. The CSS classes will be merged together. For example, if you have a Module with a CSS class `elemA` and you include it in a Content Element with a CSS class `elemB`, the included element will have both CSS classes: `elemA elemB`. This behavior will also be used in Contao 4.

This extension also includes the CSS ID of the included element if present. So if the Module or Content Element to be included has a CSS ID defined, it will also be used in the include element. However, the include element's own CSS ID will be prioritized, if defined. This behavior will not be used in Contao 4, as far as I know.

Note: in Contao 3.4.0 onwards you can already access the original CSS ID and class and the original margin values via the template variables `origCssID` and `origSpace`.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

4025d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f6ec05570f72d0fcc4d0a4fef2309799d53badf8b30484284e73724661e0d8?d=identicon)[fritzmg](/maintainers/fritzmg)

---

Top Contributors

[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (1 commits)")

---

Tags

contaocontao-modulecssmergecontaoclassesinclude

### Embed Badge

![Health badge](/badges/fritzmg-contao-mergecssclasses/health.svg)

```
[![Health](https://phpackages.com/badges/fritzmg-contao-mergecssclasses/health.svg)](https://phpackages.com/packages/fritzmg-contao-mergecssclasses)
```

###  Alternatives

[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341876.3k30](/packages/gehrisandro-tailwind-merge-laravel)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.8M12](/packages/gehrisandro-tailwind-merge-php)[yieldstudio/tailwind-merge-php

Merge Tailwind CSS classes without style conflicts

4975.4k1](/packages/yieldstudio-tailwind-merge-php)[tales-from-a-dev/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

12388.1k10](/packages/tales-from-a-dev-tailwind-merge-php)[oveleon/contao-component-style-manager

Style and CSS-Class Manager for Contao Open Source CMS

2538.4k9](/packages/oveleon-contao-component-style-manager)[craffft/css-style-selector-bundle

Contao 4 Css Style Selector bundle

1127.7k](/packages/craffft-css-style-selector-bundle)

PHPackages © 2026

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