Does the theme's custom.css not get picked up by mobiles?
When I had my customised CSS in style.css, it worked fine both on computer and mobile. But now I have made my own theme and moved it to my custom.css, it still works fine on computer but it is not being picked up on mobile. Does the theme's custom.css not get picked up by mobiles? I'd be grateful if someone could advise me on this.
Best Answers
-
whu606 MVP
In conf/ config.php
See if you have this line:
$Configuration['Garden']['MobileTheme'] = 'themenamehere';
If you do, change the theme name to your theme.
Depending on the theme you are using, it may not work great with mobiles.
An alternative would be to clone the mobile theme, then edit it to suit your theme, and then set that as your mobile theme in config.php (that's what I do.)
2 -
hgtonight MVP
By default, a mobile optimized theme is displayed on mobile devices. You can explicitly set what theme is displayed to mobile users with the configuration @whu606 pointed out.
CSS files are not shared across themes.
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
1
Answers
In conf/ config.php
See if you have this line:
$Configuration['Garden']['MobileTheme'] = 'themenamehere';
If you do, change the theme name to your theme.
Depending on the theme you are using, it may not work great with mobiles.
An alternative would be to clone the mobile theme, then edit it to suit your theme, and then set that as your mobile theme in config.php (that's what I do.)
Ah, no there is no mobile theme mentioned in conf/config, just 'Theme'. My custom.css is just a few changes from the standard Vanilla 2.0.18.8, blockquote style mainly. But the CSS was picked up when it was in style.css and the main theme worked fine on mobile then (in mobile mode rather than full site mode, it works in full site mode). So I can't see why the blockquote style isn't being picked up now.
Is the mobile theme that comes with the standard vanilla what gets used in mobile mode? There is no blockquote style in that so perhaps that is my problem. Perhaps I have misunderstood and could simply alter the css there?
Oh I see. So make that effectively a custom mobile theme. That's a good idea.
By default, a mobile optimized theme is displayed on mobile devices. You can explicitly set what theme is displayed to mobile users with the configuration @whu606 pointed out.
CSS files are not shared across themes.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Excuse my text in quote above.
Works perfectly. Thanks very much guys, appreciate it.