V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
raawaa
V2EX  ›  程序员

Bullet Point Relationship Lines in Obsidian

  •  
  •   raawaa ·
    raawaa · Mar 16, 2021 · 3190 views
    This topic created in 1869 days ago, the information mentioned may be changed or developed.

    有些 Obsidian 主题的无序列表没有竖参考线。这个我个人觉得还是很必要的,在列表比较长的时候可以看清楚内容层级。

    尝试自己添加了一下,在网上搜了一下,有现成的代码可以用,立此存照。

    /*=== Bullet Point Relationship Lines ===*/
    
    .cm-hmd-list-indent .cm-tab,
    ul ul {
      position: relative;
    }
    
    .cm-hmd-list-indent .cm-tab::before,
    ul ul::before {
      content: "";
      border-left: 1px solid rgb(245, 200, 200);
      position: absolute;
    }
    
    .cm-hmd-list-indent .cm-tab::before {
      left: 0;
      top: -5px;
      bottom: -4px;
    }
    
    ul ul::before {
      left: -15px;  /* 可手动微调竖线的左右位置 */
      top: 0;
      bottom: 0;
    }
    

    效果如下:

    Bullet Point Relationship Lines in Obsidian - example.png

    2 replies    2021-03-16 14:23:50 +08:00
    dartabe
        1
    dartabe  
       Mar 16, 2021
    顶一个 我也觉得竖参考线很有必要
    xzl380
        2
    xzl380  
       Mar 16, 2021
    cool
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1008 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 19:16 · PVG 03:16 · LAX 12:16 · JFK 15:16
    ♥ Do have faith in what you're doing.