-
AuthorPosts
-
mpurcell Friend
mpurcell
- Join date:
- March 2014
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 5 times in 2 posts
May 16, 2014 at 4:08 pm #197856I 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 ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
May 16, 2014 at 5:26 pm #535465Perhaps THIS RECOURCE may be of some assistance to you.
1 user says Thank You to TomC for this useful post
May 17, 2014 at 3:45 pm #535550Hi, 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.lessmpurcell Friendmpurcell
- Join date:
- March 2014
- Posts:
- 14
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 6
- Thanked:
- 5 times in 2 posts
May 18, 2014 at 1:42 am #535560Unfortunately, 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 PSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
May 20, 2014 at 2:49 am #535788Hi 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
-
AuthorPosts
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