New Pro + Launch: pick a template and our developers set up your site in 2 business days.
See how it works
Solved Templates

T4: where should my own CSS go so a template update does not wipe it?

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?
Product
PX University 1.0.0
Joomla
6.x
0
Votes
Undo
Solution
Phinb ThePixel team Solution 1 week ago · #110
Put it in templates//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/