Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Solved - some ZGF4 LESS newbie questions

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Yesterday I took a first look at the ZGF4 files in templates/rasa2/less and less/styles. It was really helpful and interesting to see what's going on in there, and begin to get a better understanding of the ZGF4 architecture! I have a few ZGF4 LESS newbie questions:
  1. Does custom.less work the same as custom.css - do any duplicate classes defined in custom.less override the same classes in other files, or are any classes added in custom.less supposed to be new ones?
  2. Are there any rules to keep in mind for the order and manner that newly created .less files get compiled along with the other standard .less files? Mostly I want to know if there are any best practices I should be aware of for creating and importing additional newly created .less files.
  3. Sometimes after I added a class to custom.less or another newly created .less file I created and called with @import, the LESS wouldn't compile, or it would compile but I wouldn't see the expected change in the frontend. I am sure at least some of that was due to my errors. To get around the LESS compiling problem, I ended up making some changes in the .less files that are packaged in the template. I think that probably was a poor idea. When I install a template update, will any changes I made to existing .less files get overwritten? If so, what would be considered best practices for making .less customizations that won't get overwritten?
  4. Are there any best practices guidelines to keep in mind for when a change/customization should be made to a .less file vs a .css file?
  5. Are there any other newbie ZGF4 LESS best practices to keep in mind?

Thanks,

paul
  • porwig's Avatar
  • porwig
  • 12 Month Developer
  • 143 posts
  • 4 Thanks
  • Karma: 2
Last Edit: 9 years 10 months ago by porwig.
The administrator has disabled public write access.
Hi Paul,

Just wanted to check before we cover some of your points that you had seen this doc

docs.joomlabamboo.com/zen-grid-framework-4/theme/customisation.html

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: porwig
Hi Paul - No I had not seen that documentation page, thank you for sharing it!

That page seems to address some of my questions, but it also raises at least one new one: If I create a new .less file and use "@import " to tell ZGF4 to compile it (and I see my file listed in the template-generated.less file), then do I also need to add my file to the text box in the ZGF4 admin UI, or can I skip that step? What would be considered best practices for that?

Perhaps it would be best if I do some studying and testing, and then report back in this thread with some updated and better informed questions.

Thanks again,

paul
  • porwig's Avatar
  • porwig
  • 12 Month Developer
  • 143 posts
  • 4 Thanks
  • Karma: 2
Last Edit: 9 years 10 months ago by porwig.
The administrator has disabled public write access.
Hi Paul,
No you shouldnt need to add a file to the inputbox that gets imported by a file that already included.

So it may be best to add imports directly to the custom.less file that way you dont have to add anything to the admin. custom.less gets imported anyway if it exists.

Thanks
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
The following user(s) said Thank You: porwig
In case anyone else is interested in some of these questions, Anthony did a great job of answering them and some others in this thread:
http://www.joomlabamboo.com/index.php?option=com_kunena&view=topic&catid=516&id=114975&Itemid=215

Thanks as always for the great JB support!
  • porwig's Avatar
  • porwig
  • 12 Month Developer
  • 143 posts
  • 4 Thanks
  • Karma: 2
The administrator has disabled public write access.
Thanks Paul

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers