fritzmg / contao-mergecssclasses
Small extension for Contao to automatically merge CSS classes in included elements
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:contao-module
Requires
- php: >=5.2
- contao-community-alliance/composer-installer: *
- contao/core: >=3.1,<4
Replaces
- contao-legacy/mergecssclasses: 1.0.0
This package is auto-updated.
Last update: 2019-07-21 08:17:56 UTC
README
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
.