fritzmg / contao-sharebuttons

Simple extension to provide share buttons as a module and content element in Contao
GNU Lesser General Public License v3.0
18 stars 2 forks source link

Activation of custom theme + combine scripts active disables own styles #59

Closed amenk closed 4 months ago

amenk commented 4 months ago

We are testing the module on Contao 4.13.42

As soon as a custom style is chosen, other styles of the page are lost.

We are currently debugging this and found that in

\Contao\Combiner::getCombinedFileUrl

TL_CSS contains only the styles of the contao-sharebuttons module as soon as "use custom style" is chosen.

Any hints are appreciated.

More debugging:

The combined file URL looks like this:

href="[assets/css/base.css,boxxed.css,layout.scss-6093c039.css]

~The contents of the layouts.scss is just not included in this combined file~ EDIT: (it's just at the bottom in one line)

amenk commented 4 months ago

Problem was more on the side of our setup / maybe a generic contao problem.

In our layout.scss we used @import url(example.css) to include additional CSS files. This is only allowed at the beginning of CSS files. Now in the combined CSS file, the module's code is prepended before the compiled layout.scss and the browser does no longer load those styles.

Can be solved by directly importing the CSS, not via browser