Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section class="l-spacer">
  <div class="l-container">
    <div class="olex" data-gutter="normal">
      <div class="olex__item" data-grid="desk3">

        <h3 class="c-heading -secondary" lang="en">Feature</h3>
        <p>
          Flexboxを利用したグリッドシステムで、単なる横並びや12カラムをベースとしたグリッドレイアウトも可能です。グリッド間のスペースにはborderを利用していて間隔の調整が容易にできます。もちろんこのページのレイアウトは「Olex.css」を使っているので、詳しくはデベロッパーツールで。
        </p>

      </div>

      <div class="olex__item" data-grid="desk9">
        <div class="olex" data-gutter="normal">
          <section class="olex__item" data-grid="sp12 tab4">
            <div class="c-card p-feature">
              <img src="https://shibajuku.net/demo/olex/assets/img/icon-grid.svg" alt="" />
              <h4 class="p-feature__title">Grid</h4>
              <p class="p-feature__text">12カラムを基準としたグリッドシステム。</p>
            </div>
            <!-- /.c-card -->
          </section>
          <section class="olex__item" data-grid="sp12 tab4">
            <div class="c-card p-feature">
              <img src="https://shibajuku.net/demo/olex/assets/img/icon-alignment.svg" alt="" />
              <h4 class="p-feature__title">Alignment</h4>
              <p class="p-feature__text">各アイテムの位置を揃えることもできる。</p>
            </div>
            <!-- /.c-card -->
          </section>
          <section class="olex__item" data-grid="sp12 tab4">
            <div class="c-card p-feature">
              <img src="https://shibajuku.net/demo/olex/assets/img/icon-dir.svg" alt="" />
              <h4 class="p-feature__title">Direction</h4>
              <p class="p-feature__text">アイテムの並び順を逆順に変更できる。</p>
            </div>
            <!-- /.c-card -->
          </section>
        </div>
        <!-- /.olex -->
      </div>
    </div>
    <!-- /.olex -->
  </div>
  <!-- /.l-container -->
</section>
<!-- /.l-spacer -->
              
            
!

CSS

              
                .olex {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.olex__item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* 
  Order 
*/
.olex[data-order="normal"] {
  flex-direction: row;
}

.olex[data-order="reverse"] {
  flex-direction: row-reverse;
}

/*
  Align 
*/
.olex[data-align="start"] {
  justify-content: flex-start;
}

.olex[data-align="center"] {
  justify-content: center;
}

.olex[data-align="end"] {
  justify-content: flex-end;
}

.olex[data-align="justify"] {
  justify-content: space-between;
}

.olex__item[data-align~="top"] {
   justify-content: flex-start;
}

.olex__item[data-align~="middle"] {
   justify-content: center;
}

.olex__item[data-align~="bottom"] {
   justify-content: flex-end;
}

.olex__item[data-align~="start"] {
  align-items: flex-start;
  width: 100%;
}

.olex__item[data-align~="center"] {
  align-items: center;
}

.olex__item[data-align~="end"] {
  align-items: flex-end;
}


/* 
  Gutter
*/ 
.olex[data-gutter] {
  width: auto;
}

.olex[data-gutter] > .olex__item {
  border: solid transparent;
  background-clip: padding-box;
}
.olex[data-gutter="small"] {
  margin: -1.25vw;
}

.olex[data-gutter="small"] > .olex__item {
  border-width: 1.25vw;
}

.olex[data-gutter="normal"] {
  margin: -2.5vw;
}

.olex[data-gutter="normal"] > .olex__item {
  border-width: 2.5vw;
}

.olex[data-gutter="large"] {
  margin: -3.75vw;
}

.olex[data-gutter="large"] > .olex__item {
  border-width: 3.75vw;
}

@media screen and (min-width: 768px) {
  .olex[data-gutter="small"] {
    margin: -0.5vw;
  }

  .olex[data-gutter="small"] > .olex__item {
    border-width: 0.5vw;
  }
  .olex[data-gutter="normal"] {
    margin: -1vw;
  }

  .olex[data-gutter="normal"] > .olex__item {
    border-width: 1vw;
  }

  .olex[data-gutter="large"] {
    margin: -1.5vw;
  }

  .olex[data-gutter="large"] > .olex__item {
    border-width: 1.5vw;
  }

}

/*
  Grid
*/
.olex__item[data-grid~="sp1"] {
  width: 8.33333%;
}

.olex__item[data-grid~="sp2"] {
  width: 16.66667%;
}

.olex__item[data-grid~="sp3"] {
  width: 25%;
}

.olex__item[data-grid~="sp4"] {
  width: 33.33333%;
}

.olex__item[data-grid~="sp5"] {
  width: 41.66667%;
}

.olex__item[data-grid~="sp6"] {
  width: 50%;
}

.olex__item[data-grid~="sp7"] {
  width: 58.33333%;
}

.olex__item[data-grid~="sp8"] {
  width: 66.66667%;
}

.olex__item[data-grid~="sp9"] {
  width: 75%;
}

.olex__item[data-grid~="sp10"] {
  width: 83.33333%;
}

.olex__item[data-grid~="sp11"] {
  width: 91.66667%;
}

.olex__item[data-grid~="sp12"] {
  width: 100%;
}

.olex__item[data-grid~="spFive"] {
  width: 20%;
}


@media screen and (min-width: 768px) {
  .olex__item[data-grid~="tab1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="tab2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="tab3"] {
    width: 25%;
  }
  .olex__item[data-grid~="tab4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="tab5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="tab6"] {
    width: 50%;
  }
  .olex__item[data-grid~="tab7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="tab8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="tab9"] {
    width: 75%;
  }
  .olex__item[data-grid~="tab10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="tab11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="tab12"] {
    width: 100%;
  }
}

@media screen and (min-width: 1024px) {

  .olex__item[data-grid~="lap1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="lap2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="lap3"] {
    width: 25%;
  }
  .olex__item[data-grid~="lap4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="lap5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="lap6"] {
    width: 50%;
  }
  .olex__item[data-grid~="lap7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="lap8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="lap9"] {
    width: 75%;
  }
  .olex__item[data-grid~="lap10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="lap11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="lap12"] {
    width: 100%;
  }
}

@media screen and (min-width: 1200px) {
  .olex__item[data-grid~="desk1"] {
    width: 8.33333%;
  }
  .olex__item[data-grid~="desk2"] {
    width: 16.66667%;
  }
  .olex__item[data-grid~="desk3"] {
    width: 25%;
  }
  .olex__item[data-grid~="desk4"] {
    width: 33.33333%;
  }
  .olex__item[data-grid~="desk5"] {
    width: 41.66667%;
  }
  .olex__item[data-grid~="desk6"] {
    width: 50%;
  }
  .olex__item[data-grid~="desk7"] {
    width: 58.33333%;
  }
  .olex__item[data-grid~="desk8"] {
    width: 66.66667%;
  }
  .olex__item[data-grid~="desk9"] {
    width: 75%;
  }
  .olex__item[data-grid~="desk10"] {
    width: 83.33333%;
  }
  .olex__item[data-grid~="desk11"] {
    width: 91.66667%;
  }
  .olex__item[data-grid~="desk12"] {
    width: 100%;
  }
  
  
}



/* ここから下は Olex 関係ない */
.l-container {
  margin: 5rem 5%; 
}

a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

img {
  width: 40px;
  height: 40px;
}
              
            
!

JS

              
                
              
            
!
999px

Console