0
Welcome Guest! Login
0 items Join Now

SOLVED Using CodeKit with Gantry 4 LESS files

    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • Well, global.less has, among its various imports, the following imports:

      @import "bootstrap.less";
      @import "jui/less/font-awesome.less";
      @import "jui/less/bootstrap-overrides.less";

      bootstrap.less itself imports the various bootstrap LESS files under a structure of "jui/less/*.less"

      The jui path is not in the same hierarchy, and so codekit or any other offline preprocessor will error out when trying to compile any file that calls those files.

      One of the benefits of preprocessors is the ability to use mixins, and it is counterproductive to rewrite the various mixins again in yet another less file.

      So, for example, if I want to use the .border-radius() mixin, since it is defined in jui/less/mixins.less file and that is not in the same path as templates/gantry/less the preprocessor will error out.

      Again, my question isn't to ask for you to provide support for using codekit or another preprocessor. My question is for you to provide with support to the level and extend that will allow me, as a developer, to understand where and how the framework is accessing the jui library so that I can myself develop the recourses to be able to work along-side Gantry with preprocessors such as codekit.
    • Thank you.

      Ali Samii
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • Henning wrote:
      I don't see any valid argument in your post .. sorry.

      Henning, isn't keeping the number of http requests low a valid argument? Or is it better to have an ever-expanding number of http requests? SEO and page optimisation would tend to say that reducing the http requests as much as possible is always advisable.
    • Thank you.

      Ali Samii
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • A simple approach would be to just copy the jui folder/bootstrap-file into the you less folder in the template. This way codekit should find those. (or change the paths to the files in libraries)

      I really cant see an option to tell codekit to understand how gantry is looking for files.
      I would not change the core gantry files.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • Ali ... you are straight to a point where it devides developers from regular users.
      The custom file options are best for regular users. Btw. you ac also add custom-less files ... not only css.

      For me for example it's the best to import my less-file into global less file (@import I just add my own stuff) this way no request is added or if I need to variables from the template settings (wich isn't so often) I use the gantryaddless-function.

      In the real world 1 http request more or less really doesn't count ...

      99% do small tweak to RT-templates. For those the custom files are ok.
      (I often do that too)
      If you are developing from ground up ... that's a different game.
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • Yes, I agree, and I understand the need to develop the framework and templates with the lowest common denominator in mind, meaning regular users.

      And, yes, one extra http request doesn't make much of a difference. But when you are extending the functionality of Joomla, and adding plugins, and components, and modules, and so on and so forth, they start to add up.

      One of the reasons that a developer is involved often is to reduce the resulting http requests from all of these additional enhancements. Joomla on its own, in a plain vanilla setup, already has quite a few.

      So, in that context, and for the benefit of the developer community, perhaps you can answer this question...sort of like a mini documentation.

      Where in the gantry framework is the logic (by logic, I am referring to the functionality, not the reasoning behind) that tells the framework essentially "if the less file references is not in/this/path then look for it in/this/other/path"?

      PS. And yes, I am developing from ground up...basically taking the default gantry template, stripping it of all stylings, and then building from ground up, so using something like codekit can really benefit me as I don't have to reload, clear the cache, load the front end, again and again. I am sure you can understand that reasoning.
    • Thank you.

      Ali Samii
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Using CodeKit with Gantry 4 LESS files

    Posted 11 years 11 months ago
    • I'm not 100% sure but it should be libraries/gantry/core/utilities/gantrylesscompiler.class.php
      But changing that would not really help you 'cause it will not help codekit to find the files.

      I really suggest to try to copy the files from the assets folder (libraries/gantry/assets/jui/less/) into your template. But I haven't tried that myself ...

Time to create page: 0.050 seconds