cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <ul class="tree-menu">
  <li>Foundation
    <ul>
      <li>Variable</li>
      <li>Function</li>
      <li>Mixin</li>
      <li>Vendor</li>
      <li>Vendor-extension</li>
      <li>Base</li>
    </ul>
  </li>
  <li>Layout</li>
  <li>Object
    <ul>
      <li>Component</li>
      <li>Project</li>
      <li>Theme</li>
      <li>Scope</li>
      <li>Utility</li>
      <li>QA/Test</li>
    </ul>
</ul>
            
          
!
            
              $tree-menu-padding: 1em; // 行の高さを基準に余白と位置を揃える
$tree-menu-border-width: 1px;
$tree-menu-border-color: currentColor; // colorと同じ色を指定している

.tree-menu {
    line-height: $tree-menu-padding;
}

.tree-menu,
.tree-menu ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.tree-menu > li {
  margin-bottom: ($tree-menu-padding / 2);
}

.tree-menu ul {
    position: relative;
    margin-top: ($tree-menu-padding / 2);
    margin-left: $tree-menu-padding;
    &:before {
        content: "";
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 0;
        border-left: $tree-menu-border-width solid $tree-menu-border-color;
    }
}

.tree-menu ul li {
    position: relative;
    margin: 0;
    padding: ($tree-menu-padding / 2) $tree-menu-padding;
}

.tree-menu ul li:before {
    content: "";
    display: block;
    position: absolute;
    top: $tree-menu-padding;
    left: 0;
    width: ($tree-menu-padding / 2);
    height: 0;
    border-top: $tree-menu-border-width solid $tree-menu-border-color;
}

// 1.背景色を適宜変更してください。
// `inherit`(継承)はされず、`initial`(初期値)はtransparentです。
.tree-menu ul li:last-child:before {
    top: $tree-menu-padding;
    bottom: 0;
    height: auto;
    background-color: #fff; // [1]
}

html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    max-width: 800px;
    margin: auto;
    padding: 1em;
    font-family: courier;
    // background-color: #eee;
}
            
          
!
999px
Loading ..................

Console