Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Boilerplate font

Boilerplate font 2 years 1 month ago #110522

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Hello:

I've looked at the template.css and template.js for a way to change the font attributes in the boilerplate question, Text Display. Nothing there I can find, and the only css reference I can find to this says:

/* STYLES NOT YET DEFINED - - - - -
.boilerplate {}
*/

Is there some way to change these perhaps?
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110539

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Seems that even applying styles to the boilerplate question itself does not work. In the Admin panel it displays as expected. But, testing the survey, the template css overrides the embedded styles.

Second attempt was to create a separate style sheet just for this this question, and reference that from the code within the question. That too displayed the applied styles correctly within Admin panel. But, it also was overridden by the template.css when testing the survey.

Any feedback would be greatly appreciated.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110540

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Just to follow up on this, even defining styles within the template.css style sheet itself as follows:
.boilerplate {
	font-size: 12px;
	color: #17479E;
	font-family: verdana;
	font-weight: normal;
	background-color: #E5E5E5;
	padding-left: 0;padding-right:0;
	text-align: left;
	margin-left: 0;margin-right:0;
	width: 100%;
}

... had limited effect. Despite this, the text still displayed as bold. Ultimately, the only solution is to apply inline styles individually to each and every boilerplate question to display the text as you wish.

I don't understand where this is being overridden. But, even though the work around is tedious if you have many of these types questions, it works.
Last Edit: 2 years 1 month ago by danika.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110606

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9295
  • Thank you received: 1330
  • Karma: 386
danika wrote:
I don't understand where this is being overridden. But, even though the work around is tedious if you have many of these types questions, it works.
USe a css helper for dev.

FireBug is an example.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110624

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6199
  • Thank you received: 1374
  • Karma: 538
You're not being specific enough with your selector. You need to target elements in the .boilerplate question. Details would depend on the template used.


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110754

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Thank you to both of you for the feedback. Is there somewhere where descriptors on templates can be found? Info that I have seen is scant on this. vallendar is the actual template I am using.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110762

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9295
  • Thank you received: 1330
  • Karma: 386
danika wrote:
Thank you to both of you for the feedback. Is there somewhere where descriptors on templates can be found? Info that I have seen is scant on this. vallendar is the actual template I am using.
Hi,

manual.limesurvey.org/The_template_edito..._of_question_classes

But css is like this :
for <div class="questions boilerplate"><div class="question-text">

If you have templet.css with this order:
.questions .question-text{color:#000}
.boilerplate {color:#444}

Then question-text are black, you need
.boilerplate  .question-text{color:#444}
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110768

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Hi,

The colors match from .question-text{color:xxxx} and .boilerplate{color:xxxx}, The issue is that .question-text{font-weight:bold} seems to take precedent over .boilerplate{font-weight:normal}.

So, to solve this, you are suggesting the order should be changed? As it is, .question-text{} appears ahead of .boilerplate{}. But, you are saying the order should be reversed for the attributes in question to have an effect on the .boilerplate class?
Last Edit: 2 years 1 month ago by danika.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110799

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9295
  • Thank you received: 1330
  • Karma: 386
.boilerplate .question-text{font-weight:normal}

It's the css system ...

- www.w3.org/Style/CSS/learning
- developer.mozilla.org/learn/css
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110809

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
DenisChenu wrote:
.boilerplate .question-text{font-weight:normal}

It's the css system ...

- www.w3.org/Style/CSS/learning
- developer.mozilla.org/learn/css

Classes normally don't go side by side. Is that a formatting error, or are you suggesting a double class selector?

Changing the order did not work, and placing .boilerplate {} ahead of .question-text{} was not the solution.
Last Edit: 2 years 1 month ago by danika.
The administrator has disabled public write access.

Boilerplate font 2 years 1 month ago #110816

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9295
  • Thank you received: 1330
  • Karma: 386
danika wrote:
Classes normally don't go side by side. Is that a formatting error, or are you suggesting a double class selector?
?
Really don't understand .... It's the css way
.class1{color:red}
.class2 .class1{color:green}
Make
<div class="class1">Red color</div>
<div class="class2"><div class="class1">Green color</div></div>
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: danika

Boilerplate font 2 years 1 month ago #110821

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1805
  • Thank you received: 445
  • Karma: 111
Danika,

In case it could be useful, remember that:

1) you can use some web inspector (like firebug) or CSS browser add-ons (like Live Css Editor) to avoid wasting your time with -more or less- basic CSS issues

2) you can sometimes get some benefits using !important rules
.
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.
The following user(s) said Thank You: danika

Boilerplate font 2 years 1 month ago #110831

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Ben_V, waste of time is an understatement. 9 days and finally, wallah!

Using double class selectors as Denis implied was the answer, and I also appreciate the !important tip.

As I'm sure you can tell, I code this stuff when I have to, though it is not my full time job. Thanks for the guidance. Much appreciated! Works like a charm.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.352 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form