Happy Sale Day!

30%OFF on all
Use coupon: IFTS

two styles within one template and custom.less

3 years 11 months ago #10092 by zenpig
zenpig created the topic: two styles within one template and custom.less
I'm trying to figure out what path to take here. Working with jm-animals template and I have two styles within the template and can see that each style has it's own .css but the .map for each style goes to the same custom.less file. I would like a few custom css elements to show in one style but not the other but since the .map for each is to the same .less file I can't do it that way. Basically, custom.[styleid35].css and custom.[styleid37].css both have a .map that points to the same custom.less file. Ultimately, I'd like custom35.less and custom.less to be mapped to one style and just custom.less to the other. I've tried editing directly the .map source parameter of one of the styles to also include custom35.less file but it doesn't work...I kind of figured it wouldn't since from my understanding css.map files are generated.

Any idea other than creating a new template for some minor differences in the styles? I've looked at jm_template.php and it seems if I had another .less file in the array that less file would map to both the styles

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

3 years 11 months ago #10093 by artur
artur replied the topic: two styles within one template and custom.less
I'm afraid I do not understand what you are trying to achieve...
For what reason you like to modify map file? The map file is generated only to help with development it's not related to design at all.

There is one 'custom.less' file.
This file is compiled to CSS, depends on selected template styles so:

Template style1 (id:1) -> custom.less -> custom.1.map + custom.1.css
Template style2 (id:2) -> custom.less -> custom.2.map + custom.2.css

If you need to prepare different styles for each template styles, then you should add an additional class in template blocks and less, for example:

.style1 something {}
.style2 something-else {}

or create a new template.

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

Time to create page: 0.225 seconds


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

Copyright © 2009-2021 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.