test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • mpurcell Friend
    #197856

    I would like to have the ability to add a custom.less file that behaves like the custom.css file in that it would not be replaced when the framework is updated to a new version. I have done all my less customizations by placing the customized information at the bottom of the style.less file and modified variables at the bottom of the variables.less file. I find it a bit unwieldy to copy and paste the modifications into the new versions of these files, (twice now in the short time I’ve been using t-3 framework.) This would also encourage developers to learn and use less, some of the features of which are very handy. In my opinion, this would make the framework more user friendly.

    TomC Moderator
    #535465

    Perhaps THIS RECOURCE may be of some assistance to you.

    mexica Friend
    #535550

    Hi, MPurcell.
    You need to create a new theme…the form mostly easy is copy the old theme to a new theme. And after this, you will need change the theme files in template/t3/less/themes/red/variables-custom.less and template/t3/less/themes/red/template.less

    mpurcell Friend
    #535560

    Unfortunately, this request is not answered. I am using the t3_bs3_blank template as a base, and a theme named “premierbranded15” which increases the default font size by 1px to 15px and sets some color. The site is very small, only four pages, and the theme is the only theme I have defined and is applied to the entire site. You can look at the live version of the site at http://www.premier-cleaning-services.com, although I use an identical localhost version of the site for testing.

    I had some time to do some testing this afternoon. I found that if I move all my custom edits from templatest3_bs3_blanklessstyle.less and ……variables.less to templatest3_bs3_blanklessthemespremierbranded15template.less and ……….variables.less the site breaks completely. When I move the code back to the original locations, the site displays fine. When I moved smaller bits of code at a time, I found that the variables can be successfully moved to the theme’s variables.less file, but that the code edits moved to the theme’s template.less and template-responsive.less files do not work.

    As a single example, I have an image of the nearby mountains in the header, which you can see if you look at the site. The code in variables.less is
    @header-image: "@{t3-image-path}/mountain-panorama.jpg";
    and the code in style.less is

    .t3-header {
    background: url(@header-image) center center;
    }

    I can move the variable to the theme’s variable.less file and back to the template’s variable.less file with no effect, but of course if I leave it out of both files I get an error. However, if I move the code setting the t3-header image to the theme’s template.less file, the image goes away and the header becomes transparent. I also found that if I have the code active in both files, the image still goes away, but of course if I remove the code from both files, I get an error.

    So clearly, as hopeful as it sounds, this is not a solution to my request, and I am still left with non-persistent code that I must apply manually after each update.

    Maybe one of you can shed some light on this?

    Thanks,
    Michael P

    Saguaros Moderator
    #535788

    Hi Michael,

    If you create a new theme as @mexica suggested, your custom code in this theme will not be affected when updating template.

    Thought that if your site is small and you use only one theme, please try to add your custom css in /templates/your_default_template/css/custom.css file

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 4 voices, and was last updated by  Saguaros 10 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum