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

手机浏览NexT.Mist主题下的代码框里行号显示问题 #459

Closed
isudox opened this issue Oct 26, 2015 · 16 comments
Closed

手机浏览NexT.Mist主题下的代码框里行号显示问题 #459

isudox opened this issue Oct 26, 2015 · 16 comments

Comments

@isudox
Copy link

isudox commented Oct 26, 2015

PC上Mist主题渲染的代码狂行号显示正常,但手机端浏览就会有问题

@iissnan
Copy link
Owner

iissnan commented Oct 26, 2015

是什么手机? 方便的话,把那段代码也提供一下

@isudox
Copy link
Author

isudox commented Oct 26, 2015

Nexus6 Chrome浏览器

markdown文件里的代码

// example1.js
var vim_fan = true;
var emacs_fan = false;
function judge() {
    if (vim_fan && emacs_fan) {
        alert("You must be burned!");
    }
}

@gaoryrt
Copy link

gaoryrt commented Oct 26, 2015

ios 是这样的,safari 的响应式设计也看得到
屏幕快照

@huberylee
Copy link

最新的版本貌似是有这个问题,不光只在移动端行号与代码重叠的问题,在PC上有些代码也无法识别,没有行号 http://www.huberylee.cn/2015/10/20/GNU-C常用扩展/

@iissnan
Copy link
Owner

iissnan commented Oct 26, 2015

@huberylee 你这个问题似乎跟 highlight.js 的渲染有关系,试试给那些行号不正确的代码指明代码块使用的语言试试

@gaoryrt
Copy link

gaoryrt commented Oct 26, 2015

感觉是代码块的 +mobile() 解析问题

@huberylee
Copy link

@iissnan 我不知道如何指定代码块使用的语言,还请指点一二,谢谢!

@isudox
Copy link
Author

isudox commented Oct 27, 2015

@huberylee 三个`后加上语言名,如java。```java

@maonx
Copy link

maonx commented Oct 27, 2015

使用bash语言 确实也有这个问题 ,手机下行号要重叠的

@zlliang
Copy link

zlliang commented Nov 19, 2015

我的解决方法修改CSS。是将 highlight.styl 文件中把第 54 行的 @line-number 中的 padding: 20px 改为 margin: 10px。目前显示正常。也算是一个土方法吧。这个文件的具体路径是 /next/source/css/_common/components/highlight

@lsl233
Copy link

lsl233 commented Dec 6, 2015

请问 next.mist主题 怎么设置,我查了好久,都没关于mist的东西

@zlliang
Copy link

zlliang commented Dec 6, 2015

稳定版的主题里,highlight.styl文件在next/source/css/_common/_vendor/highlight目录下。第75行开始有关line-number的内容。
2015-12-06 21 16 20

@zhangjh
Copy link

zhangjh commented Dec 22, 2015

@MBL-Quincy 我试了你的方法不行,我的方法是修改custom.styl (路径:source/css/_custom)
增加
.code {
padding-left: 20px !important;
background-color: black;
}

@bluestein
Copy link

if your theme is NeXT-Pisces, modify the file:
themes\next-pisces\source\css\_common\components\highlight\highlight.styl
@Line54
padding-right: 20px -> padding-right: 28px !important

@ykqmain
Copy link

ykqmain commented Jan 7, 2016

手机上所有代码行号都跟第一个字符重叠

@stevenjoezhang
Copy link
Contributor

这个问题似乎在
1985b7e#diff-ddaaf61bc40a2d092db6ddb0715dbde0
修复了

@ivan-nginx ivan-nginx added this to the v5.1.4 milestone Mar 16, 2019
Repository owner locked as resolved and limited conversation to collaborators Mar 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests