MOxFIVE / hexo-theme-yelee

简而不减 Hexo 双栏博客主题; Another simple and elegant theme for Hexo.
http://moxfive.xyz/
1.38k stars 328 forks source link

代码区前后有很多空行,请修复 #142

Open AnswerZhao opened 8 years ago

ghost commented 8 years ago

你要把代码块里的空格行给删掉,我猜测他显示的代码块显示的高度其实是应该包括了空行,但是他空行会放在最后面。

li360 commented 8 years ago

代码块里应该要保留空行在正确的位置上。

MOxFIVE commented 8 years ago

128

yelog commented 7 years ago

这个问题是由于空行不占位导致的显示错位 在source/css/_partial/highlight.styl中22行加入:

.line:after
    content: ''
    display: inline-block;

即可解决这个问题,下面是代码所在的上下文:

.article-entry
  pre, code
    font-family: font-mono, monospace, font-chs
    font-size: 1em

  .line:after
    content: ''
    display: inline-block;

  pre
    @extend $code-block
    code
      text-shadow none
      padding 0
      background none
      color highlight-foreground
      box-shadow none
taozhijiang commented 7 years ago

但是是不是这个设置,safari代码显示错位