Welcome to the LimeSurvey Community Forum

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

Changing core-breakpoints in individual themes?

  • steffih
  • steffih's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago - 5 years 5 months ago #175703 by steffih
hi there,

in my current theme-project, i need certain array-questions to stay at desktop view until the width of 665px (right now it jumps to mobile view at 768px). Is there a way to achieve this without overwriting the theme-core.css? I tried to overwrite the CSS and media queries for certain question-types, but I cannot fully "reset" the mobile view to desktop view as some CSS cannot be "unset". Also, I need to do this only for one theme, this should not apply to all themes on the limesurvey system - this is why i cannot overwrite the main template-core.css.

did anyone have a similar problem and knows how to solve this? in 2.7x, you could just remove some classes at the level of the question, but at 3.x those classes do not exist anymore.

thanks in advance!
stefanie
Last edit: 5 years 5 months ago by steffih.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175706 by DenisChenu
Replied by DenisChenu on topic Changing core-breakpoints in individual themes?
In config.php
Code:
'clientScript'=>array(
      'packages' => array(
        'template-core'=>array(
          'css'=> null,
        ),
      ),
    ),

But template-core must be in theme/config.xml i think.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175729 by tpartner
@DenisChenu, can you please explain what that does (or point to documentation)?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175733 by DenisChenu
Replied by DenisChenu on topic Changing core-breakpoints in individual themes?

tpartner wrote: @DenisChenu, can you please explain what that does (or point to documentation)?

This remove the css file from template-core package

But since this need a better solution
1. i think template-core must be in config.xml of theme
2. This solution offer an alternative way : github.com/LimeSurvey/LimeSurvey/pull/1152 not to update media query, but to disable it on some question.

Then no manual update since it's unstable currently.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175734 by tpartner

1. i think template-core must be in config.xml of theme

I totally agree.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 5 months ago #175736 by Mazi
Hi everyone,
thanks for your feedback. Unfortunately, removing the template core file for the whole system won't help since there are 2-3 different templates used and others are based on the core template file. Only this special version is having problems with the specifications from the core file.
Are there any other approaches you can think of?

@Tony: Would some JS to remove the template-core.css file from the DOM do the trick if we add a "custom" template-core CSS file using the config.XML file of this template?

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #175737 by tpartner
To remove template-core.css for a specific theme, add this to your custom.js file:

Code:
$('link[href$="template-core.css"]').remove();

Of course, you will also want to copy the contents of template-core.css to your custom.css file and modify as required.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 5 months ago by tpartner.
The following user(s) said Thank You: steffih
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175742 by DenisChenu
Replied by DenisChenu on topic Changing core-breakpoints in individual themes?
With config : you can remove css from template-core, BUT add a dependance to another css file too for example.

But best solution seems to put template-core in package (with the rtl system because it's NEEDED).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 5 months ago - 5 years 5 months ago #175746 by LouisGac
another way to do:

in the config.xml of the theme:
Code:
<files>
        <css>
            <remove>path to the file you want to remove</remove>
        </css>
</files>

see:

The remove keyword:
manual.limesurvey.org/New_Template_Syste...x#The_remove_keyword
Last edit: 5 years 5 months ago by LouisGac.
The topic has been locked.
  • steffih
  • steffih's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175853 by steffih
Thanks, this worked!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose