JM Uniresity, LESS, change font-size for extension

More
2 years 10 months ago #9780 by Remig
Remig created the topic: JM Uniresity, LESS, change font-size for extension
hi,
i have JM University 1.1.4 w/WCAG . I want to that fonts in the extension also changing the size and color when the user uses accessibility switches (contrast or size). I'm trying to add code to custom.less - but receives errors.

f.ex.:
1. for the default font size I wrote code which works fine:
.tt_timetable .event .before_hour_text, .tt_timetable .event .after_hour_text {
	font-size: (@JMbaseFontSize - 3);
}
2. but for larger or smaller font size i wrote code which does not work :
.tt_timetable .event .before_hour_text, .tt_timetable .event .after_hour_text {
    font-size: (@JMbaseFontSize - 3) * @JMfontFactor;
}

error msg:

Parser Less - variable @JMfontFactor is undefined in file /www/templates/mysite/less/custom.less in custom.less on line 15, column 34 13| //remi 14| .tt_timetable .event .before_hour_text, .tt_timetable .event .after_hour_text { 15| font-size: @JMbaseFontSize * @JMfontFactor; 16| } 17| 18| /*


How to enable resizing (WCAG) for other classes (non-template - additional extensions) using file custom.less?

--
regards
Remi

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #9781 by artur
artur replied the topic: JM Uniresity, LESS, change font-size for extension
Hello,
First you should declare font factors for font-size steps:
@JMfontFactor70: 0.7;
@JMfontFactor80: 0.8;
@JMfontFactor90: 0.9;
@JMfontFactor110: 1.1;
@JMfontFactor120: 1.2;
@JMfontFactor130: 1.3;
Next you should prepare code, based on classes:
.fsize70 { /* font size 70% */
  .element_class {
    font-size: X * @JMfontFactor70;
  }
}

.fsize80 {
  .element_class {
    font-size: X * @JMfontFactor80;
  }
}

...


.fsize130 {
  .element_class {
    font-size: X * @JMfontFactor80;
  }
}
where X is actual (default) size.

You can also use simple css styles. Example :
.fsize70 .element_class {
font-size:  12px;
}

.fsize80 .element_class {
font-size: 14px;
}

.fsize130 .element_class {
font-size: 30px;
}

Regards.

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago #9782 by Remig
Remig replied the topic: JM Uniresity, LESS, change font-size for extension
thats works perfectly !

thanks you Artur :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.170 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.