MOxFIVE / hexo-theme-yelee

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

markdown 列表支持有问题 #32

Closed rushingFiend closed 8 years ago

rushingFiend commented 8 years ago

当输入以下 markdown 时

  1. test

    • test

      test

    • test
  2. test

出来的效果有问题,话说要怎么在这里贴图片来着。。。。

MOxFIVE commented 8 years ago

主题自定义了无序列表的样式,兼容性不是很好。你可以修改成像 GitHub 显示的小圆圈。

https://github.com/MOxFIVE/hexo-theme-yelee/blob/master/source/css/_partial/article.styl#L163

  ul{
    li:before{
      display inline-block;
      content: "";
      width: .4em;
      height: .4em;
      margin-right: .5em;
      margin-bottom: .11em;
      border: 1px solid lightgray;
      border-radius: 50%;
      background: lightgray;
    }
  }

删掉上面代码,用下面的替换

ul li {
    list-style-type: circle;
    margin-left: 1.2em;
}

贴图: 直接把图片托到评论框

rushingFiend commented 8 years ago

eefc2253-d5bb-447a-afc5-2e2ff82c7dd2

按你说的处理了之后还是有问题。。是不是跟有序列表的兼容性也有关?

MOxFIVE commented 8 years ago

我的疏漏,下面的样式也要改一下,ul去掉: https://github.com/MOxFIVE/hexo-theme-yelee/blob/master/source/css/_partial/article.styl#L180

  li{
-   ul,ol{
+   ol {
      margin-left: 30px;
      li:before{
        content: "";
        background: #dedede;
      }
    }
  }

snip20160201_1

rushingFiend commented 8 years ago

嗯嗯,可以了,谢谢!!