Then let me know the URL to your site and I will look to see if your statements are reflected in the compiled CSS. Put your statement in one of those, then go into template manager > advanced > less compiler and PRESS "CLEAR CACHE" to clear the less cache (so we know we're on a sound footing to start with). Note that you can just put ordinary CSS in a LESS file but you are strongly encouraged to learn more about LESS as it will speed up your development and make it clearer.ĭo not change the CSS files in the compiled-css folder as these changes will be lost whenever Gantry 4 detects a change in a LESS file, or the cache gets cleared.įor more information on LESS please see the documentation on Gantry 4 at Now clear your cache! GANTRY4 will automatically detect this file and automatically compile the LESS code therein and put it into the compiled css for your site (along with the other compiled LESS files from the template). For those of you that want to use the power of LESS (compiled CSS), you can simply create a file called "template-custom.less" (that is the file name - don't change it) and put this file in the less folder of the template. you can also have browser specific files by appending, for example, "-ie9" making the filename " -custom-ie9.css"Ģ. GANTRY4 will automatically load this CSS file. For older templates (pre FRACTURE LESS compiler is not active), or for those of you that want to stick with traditional CSS, you can simply create a file called " -custom.css" and put this file in the CSS folder of the template (where is the name of the template e.g. ![]() Unless you specifically want to use LESS then you should USE ITEM 1 below.ġ. There are two recommended methods for dealing with your custom changes to the template. I'm guessing you'd rather use LESS.Īs GANTRY4 now incorporates LESS. Let's look at why your change to one of our LESS files didn't get reflected compiled CSS after using a standard plain text editor.ĭo you want to write LESS rather than CSS? Either way here is how to create a custom LESS or custom CSS file. Ok, so let's drop codekit altogether since your not asking for support on that. 500 changes taking 10 seconds longer for each change is about 84 minutes of time wasted switching back and forth.Īnd that is just one of the advantages of using something like CodeKit If you are making 4 or 5 changes only, that's not a big deal, but if you are implementing hundreds of modifications to the layout, you are talking about a lot of time. So, a 2 second change takes 10 or 15 seconds to implement. Using the built-in functionality of Gantry, the process starts the same way, edit and save the Less, then I have to switch over to the front-end in my browser and manually reload the page (or have an auto-loader that refreshes the page every X seconds/minutes, etc). I have a dial-monitor setup, and I can edit the Less, invoke the compiler in CodeKit by simply saving, and see the result in the browser instantly. For example, if I want to make a modification to the positioning of something, I can use the CSS injection capabilities of CodeKit to speed up the development process enormously. But the template and framework should have an option to specifically allow outside compiling, or at the very least, documentation should be provided that let's people know how the template/framework is structured in a way that allows them to make the necessary modifications to allow 3rd party utilities such as CodeKit.įinally, there are a lot of other advantages to using a 3rd party preprocessor tool such as CodeKit. Having the backend template processes compile the CSS from the less is good if someone is relying solely on the template. However, even with the compiler feature turned on in the gantry backend, codekit compiling turned off, and adding "#rt-popuplogin " into template.less, nothing happened. ![]() ![]() The advantage of using something like CodeKit is the ability to make changes and have the CSS injected without having to reload the page and thus invoke the compiler.įurthermore, my question is specifically related to adjusting the Gantry code so that the paths to the less files that are outside the normal path can be used.Īs regards using the built-in compiler of Gantry, I followed the tutorial for creating a pop-up login feature in gantry.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |