By jamesdd on Tuesday, 06 October 2026
Posted in Templates
Replies 2
Likes 0
Views 17
Votes 0
I changed a few styles directly in template.css and lost them after the last template update. What is the T4 way to keep my CSS?
Put it in
templates/<your template>/local/css/custom.css
(create the folders if they are missing). T4 looks for a file in local/ first, then in the template, then in the framework's base theme – and it loads custom.css after template.css, so your rules win without !important.

Template updates never ship a local folder, so nothing in there is overwritten.

Two tips:
- Use the theme colors instead of hex values, so a change in the Theme tab still applies:
/* local/css/custom.css */
.course-card .btn { background: var(--color-primary); }
.site-footer a:hover { color: var(--footer-link-hover-color); }

- The Theme tab writes those variables to
media/t4/css/<style id>.css
– don't edit that file, T4 rebuilds it when you save the style.
·
1 week ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Moved everything to local/css/custom.css and switched the hex values to the variables. Works, thanks.
·
1 week ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post