Boilerplate font

More
3 years 2 months ago #110522 by danika
danika created the topic: Boilerplate font
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?

Please Log in to join the conversation.

More
3 years 2 months ago #110539 by danika
danika replied the topic: Boilerplate font
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.

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #110540 by danika
danika replied the topic: Boilerplate font
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: 3 years 2 months ago by danika.

Please Log in to join the conversation.

More
3 years 2 months ago #110606 by DenisChenu
DenisChenu replied the topic: Boilerplate font

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 development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 2 months ago #110624 by tpartner
tpartner replied the topic: Boilerplate font
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.

Please Log in to join the conversation.

More
3 years 2 months ago #110754 by danika
danika replied the topic: Boilerplate font
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.

Please Log in to join the conversation.

More
3 years 2 months ago #110762 by DenisChenu
DenisChenu replied the topic: Boilerplate font

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 development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #110768 by danika
danika replied the topic: Boilerplate font
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: 3 years 2 months ago by danika.

Please Log in to join the conversation.

More
3 years 2 months ago #110799 by DenisChenu
DenisChenu replied the topic: Boilerplate font
.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 development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #110809 by danika
danika replied the topic: Boilerplate font

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: 3 years 2 months ago by danika.

Please Log in to join the conversation.

More
3 years 2 months ago #110816 by DenisChenu
DenisChenu replied the topic: Boilerplate font

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 development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: danika

Please Log in to join the conversation.

More
3 years 2 months ago #110821 by Ben_V
Ben_V replied the topic: Boilerplate font
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
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: danika

Please Log in to join the conversation.

More
3 years 2 months ago #110831 by danika
danika replied the topic: Boilerplate font
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now