Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                <main>
  <article class="eNews">
    <a href="" class="news-link">
      <time datetime="2020-03-29" class="news-date">2020.03.29</time>
      <span class="news-cate-youtube">YouTube</span>
      <p class="news-title">「太陽の石」"もどき"を自作する !</p>
    </a>
  </article>
  <article class="eNews">
    <a href="" class="news-link">
      <time datetime="2020-03-28" class="news-date">2020.03.23</time>
      <span class="news-cate-event">イベント</span>
      <p class="news-title">中止 : 第21回 GREENシンポジウム水素社会実現における液体水素の果たす役割</p>
    </a>
  </article>
  <article class="eNews">
    <a href="" class="news-link">
      <time datetime="2020-03-30" class="news-date">2020.03.13</time>
      <span class="news-cate-event">イベント</span>
      <p class="news-title">NIMS 一般公開2020 中止と代替策のお知らせ</p>
    </a>
  </article>
  <article class="eNews">
    <a href="" class="news-link">
      <time datetime="2020-02-14" class="news-date">2020.02.14</time>
      <span class="news-cate-result">研究成果</span>
      <p class="news-title">鉄腐食細菌は黒サビを使って腐食を加速させていた</p>
    </a>
  </article>
  <article class="eNews">
    <a href="" class="news-link">
      <time datetime="2020-03-30" class="news-date">2020.02.06</time>
      <span class="news-cate-result">研究成果</span>
      <p class="news-title">ほぼ室温超伝導を示す高圧下ランタン水素は量子固体だった</p>
    </a>
  </article>
</main>
              
            
!

CSS

              
                body {
  color: #262626;
  background: #fff;
  font-family: Arial,"Hiragino Kaku Gothic Pro","BIZ UDPGothic",Meiryo,sans-serif;
}
.eNews {
  border-bottom: 1px solid #949494;
  font-size: 0;
  padding: 19px 0;
}
.news-link {
  color: #262626;
  display: grid;
  grid-gap: 5px 18px;
  grid-template-columns: min-content 1fr;
  text-decoration: none;
}
.news-date {font-size: 13px;}
[class^="news-cate"] {
  border-radius: 3px;
  color: #fff;
  display: inline-block;
  font-size: 13px;
  text-align: center;
  width: 80px;
}
.news-cate-youtube {background: red;}
.news-cate-event {background: #536d19;}
.news-cate-result {background-color: #1976D2;}
.news-title {
  font-size: 16px;
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-link:hover .news-title,
.news-link:focus .news-title {text-decoration: underline;}

@media (min-width:600px) {
  .news-link {
    grid-gap: 22px;
    grid-template-columns: max-content 100px 1fr;
  }
  .news-date,
  [class^="news-cate"] {font-size: 16px;}
  [class^="news-cate"] {width: auto;}
  .news-title {grid-column: auto;}
}
              
            
!

JS

              
                
              
            
!
999px

Console