Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

adding a new css file to a theme in LS 5

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 1 month ago #226393 by ritapas
Please help us help you and fill where relevant:
Your LimeSurvey version: [5.1.14]
Own server or LimeSurvey hosting: own
Survey theme/template: custom
==================
Hello,
I wish to add a css file to a theme (which btw it's inherited from the skelvanilla one, but I also tried with an extended version of the vanilla one).

I put the css file inside upload/themes/survey/mytheme/css

Then I modified the config.xml file as follows:
(snip)
    <files>
        <css>
            <remove>css/ajaxify.css</remove>
            <remove>noto.css</remove>
            <remove>yiistrap.css</remove>
            <remove>bootstrap-slider.css</remove>
            <remove>awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css</remove>
            <remove>awesome-bootstrap-checkbox/awesome-bootstrap-checkbox-rtl.css</remove>
            <remove>css/noTablesOnMobile.css</remove>
            <remove>template-core.css</remove>
            <remove>css/theme.css</remove>
            <remove>css/custom.css</remove>
            <add>css/skelvanilla.css</add>
            <add>css/rita.css</add>
        </css>
        <js>
(snip)
I also added a reference to the file to each of the sections inside <screens>

The file is indeed shown in the editor BUT it is not loaded by the survey pages.
What did I miss?

Thank you.


.





 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #226404 by tpartner
Replied by tpartner on topic adding a new css file to a theme in LS 5
Did you try resetting the theme after making the change?

Also, clear the assets in global configuration.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, ritapas

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 1 month ago #226417 by DenisChenu
Replied by DenisChenu on topic adding a new css file to a theme in LS 5
Else to have a better order in css , i didn't use this broken system

See : gitlab.com/SondagesPro/SurveyThemes/skel...ws/header/theme.twig

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: ritapas

Please Log in to join the conversation.

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 1 month ago #226423 by ritapas
Replied by ritapas on topic adding a new css file to a theme in LS 5
Hello,
Since I thought I didn't want to reset the theme (wouln't that delete the parts modified by me?) I tried at first to export and import again the theme, after having renamed the old one. This worked, though it yielded some errors ad first execution, which I am not able to reproduce. I think that export+import has something to do with tpartner's advice, hasn't it?

@Denis I think this is because I was using an old version of skelvanilla for this test.
This leads to a question that maybe I should ask in a new post. Is there a way to update a theme inplace inside LS5? I cannot delete the old skelvanilla because othere theme inherit from it. If I rename it (e.g. skelvanilla_old) and import a new skelvanilla, the inherited theme will keep their reference to the "skelvanilla_old" one.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #226424 by tpartner
Replied by tpartner on topic adding a new css file to a theme in LS 5
Resetting the theme should reload the config.xml file incorporating your changes, not deleting them.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: ritapas

Please Log in to join the conversation.

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 1 month ago #226425 by ritapas
Replied by ritapas on topic adding a new css file to a theme in LS 5
Thank you.
I'll post the other question in a new thread.
Rita
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose