Giter VIP home page Giter VIP logo

contao-mergecssclasses's Introduction

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.

contao-mergecssclasses's People

Contributors

fritzmg avatar

Stargazers

 avatar

Watchers

 avatar

contao-mergecssclasses's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.