Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Can't override style in reboot child theme
Avatar
Roger Martin
Member
Free Members
Offline
Feb 20, 2015 - 11:53 am

I'm using the Reboot theme and created a child theme rebootchild. As a test, I want to change the font size, so I opened sp-resources/forum-themes/rebootchild/styles/rebootchild.php and added this line (it's the only thing in there):

#spMainContainer { font-size: 2em !important; }

When I refresh the forum the F12 tools confirm that the file is getting to the browser but it won't recognize the CSS. This is happening in multiple browsers and I confirmed it's not a browser cache issue.

The only clue that looks out of place is the HTTP response headers are specifying rebootchild.php as text/problem-with-post-edit-buttontml instead of text/css. Not sure why the server is doing that or if it's relevant, but reboot.php is being correctly sent as text/css.

You can see this for yourself here.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Feb 20, 2015 - 12:03 pm

Did you add the header. The child css (php) file will need the following header at the very top of the file:

<?php
header("Content-Type: text/css; charset: utf-8");
header("Expires: ".gmdate('D, d M Y H:i:s', (time()+900)) . " GMT");
?>

If you haven't added that then that is probably the problem.

We are planning to include child theme 'frameworks' probably in the next update which will help in the future.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Roger Martin
Member
Free Members
Offline
Feb 20, 2015 - 12:12 pm

That did it. Thanks - I didn't realize that was required.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Feb 20, 2015 - 12:15 pm

No reason you should without a framework or the proper codex page in place yet. :)
You are a trailblazing early adopter !

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625