Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body font is 12px when using the scheme Mist on mobile phone [solved] #245

Closed
5 of 11 tasks
zhaoyibo opened this issue Apr 19, 2018 · 11 comments
Closed
5 of 11 tasks

Comments

@zhaoyibo
Copy link

zhaoyibo commented Apr 19, 2018

I agree and want to create new issue


Expected behavior

Keep the same font size

Actual behavior

The text is 12px font, but the code is 14px font

Steps to reproduce the behavior

  1. use scheme Mist
  2. use mobile phone to browse
  • Link to demo site with this issue: N/A
  • Link(s) to source code or any usefull link(s): N/A

Node.js and NPM Information


Package dependencies Information


Hexo Information

Hexo version


Hexo Configuration

NexT Information

NexT Version:

  • Latest Master branch
  • Latest Release version
  • Old version

NexT Scheme:

  • All schemes
  • Muse
  • Mist
  • Pisces
  • Gemini

NexT Configuration:

Other Information

This problem only applies to scheme Mist, and there are no problems with the other schemes.

@maple3142
Copy link
Contributor

Set font option in _config.yml manually?

font:
  enable: false

  # Uri of fonts host. E.g. //fonts.googleapis.com (Default).
  host:

  # Font options:
  # `external: true` will load this font family from `host` above.
  # `family: Times New Roman`. Without any quotes.
  # `size: xx`. Use `px` as unit.

  # Global font settings used for all elements in <body>.
  global:
    external: true
    family: Lato
    size:

  # Font settings for Headlines (H1, H2, H3, H4, H5, H6).
  # Fallback to `global` font settings.
  headings:
    external: true
    family:
    size:

  # Font settings for posts.
  # Fallback to `global` font settings.
  posts:
    external: true
    family:

  # Font settings for Logo.
  # Fallback to `global` font settings.
  logo:
    external: true
    family:
    size:

  # Font settings for <code> and code blocks.
  codes:
    external: true
    family:
    size:

@zhaoyibo
Copy link
Author

zhaoyibo commented Apr 19, 2018

I just switched it from off to on and changed fonts CDN. This is my configuration.

font:
  enable: true

  # Uri of fonts host. E.g. //fonts.googleapis.com (Default).
  host: //fonts.loli.net

  # Font options:
  # `external: true` will load this font family from `host` above.
  # `family: Times New Roman`. Without any quotes.
  # `size: xx`. Use `px` as unit.

  # Global font settings used for all elements in <body>.
  global:
    external: true
    family: Lato
    size:

  # Font settings for Headlines (H1, H2, H3, H4, H5, H6).
  # Fallback to `global` font settings.
  headings:
    external: true
    family:
    size:

  # Font settings for posts.
  # Fallback to `global` font settings.
  posts:
    external: true
    family:

  # Font settings for Logo.
  # Fallback to `global` font settings.
  logo:
    external: true
    family: 
    size:

  # Font settings for <code> and code blocks.
  codes:
    external: true
    family:
    size:

@maple3142
Copy link
Contributor

You can set size for each type of text.

@zhaoyibo
Copy link
Author

It does not work for me. I set the global font size to 14px, but it still show 12px.

@ivan-nginx
Copy link
Member

I set the global font size to 14px, but it still show 12px.

So? Where is u configuration? In config abouve font sizes are not setted.

@reuixiy
Copy link
Contributor

reuixiy commented Apr 19, 2018

Add the following code to ~/blog/themes/next/source/css/_custom/custom.styl :

@media (max-width: 767px) {
    .posts-expand .post-body {
        font-size: 14px;
    }
}

@zhaoyibo
Copy link
Author

@ivan-nginx Thanks for the reply.
The configuration above was not actually setted, but I tried to set it up, like below, with no effect.

font:
  enable: true

  # Uri of fonts host. E.g. //fonts.googleapis.com (Default).
  host: //fonts.loli.net

  # Font options:
  # `external: true` will load this font family from `host` above.
  # `family: Times New Roman`. Without any quotes.
  # `size: xx`. Use `px` as unit.

  # Global font settings used for all elements in <body>.
  global:
    external: true
    family: Lato
    size: 14px

  # Font settings for Headlines (H1, H2, H3, H4, H5, H6).
  # Fallback to `global` font settings.
  headings:
    external: true
    family:
    size:

  # Font settings for posts.
  # Fallback to `global` font settings.
  posts:
    external: true
    family:

  # Font settings for Logo.
  # Fallback to `global` font settings.
  logo:
    external: true
    family: 
    size:

  # Font settings for <code> and code blocks.
  codes:
    external: true
    family:
    size:

This problem will only appear in scheme Mist. Other schemes do not have this problem.

@maple3142
Copy link
Contributor

maple3142 commented Apr 20, 2018

You can set font.codes.size to 14px


  # Font settings for <code> and code blocks.
  codes:
    external: true
    family:
    size: 14px

@zhaoyibo
Copy link
Author

zhaoyibo commented Apr 20, 2018

The font size of the code is already 14px.
Anyway, I tried it, the body font is still 12px, the font of the code is 14px.

  global:
    external: true
    family: Lato
    size: 14px
  codes:
    external: true
    family:
    size: 14px

@zhaoyibo
Copy link
Author

@reuixiy Thanks. It works fine and I'm going to use this as a temporary solution if I use Mist scheme again.

@ivan-nginx
Copy link
Member

ivan-nginx commented Apr 26, 2018

Fixed in #262.

@ivan-nginx ivan-nginx changed the title Body font is 12px when using the scheme Mist on mobile phone Body font is 12px when using the scheme Mist on mobile phone [fix added] Apr 26, 2018
@ivan-nginx ivan-nginx changed the title Body font is 12px when using the scheme Mist on mobile phone [fix added] Body font is 12px when using the scheme Mist on mobile phone [solved] Mar 4, 2019
@ivan-nginx ivan-nginx added the Bug label Mar 4, 2019
@1v9 1v9 added the 🌀 Fonts label Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants