Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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

  • whu606whu606 MVP
    Answer ✓

    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.)

  • hgtonighthgtonight MVP
    Answer ✓

    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.

Answers

  • whu606whu606 MVP
    Answer ✓

    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?

  • 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.)

    Oh I see. So make that effectively a custom mobile theme. That's a good idea.

  • hgtonighthgtonight MVP
    Answer ✓

    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.

Sign In or Register to comment.