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 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

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

              
                <h1>prefers-color-scheme</h1>

<p><strong><code>prefers-color-scheme</code></strong> <a href="/ko/docs/Web/CSS">CSS</a> <a href="/ko/docs/Web/CSS/@media#media_features">미디어 특성</a>은 사용자의 시스템이 라이트 테마나 다크 테마를 사용하는지 탐지하는 데에 사용됩니다.</p>

<h2>구문</h2>

<dl>
  <dt><code>no-preference</code></dt>
  <dd>사용자가 시스템에 선호하는 테마를 알리지 않았음을 나타냅니다. 이 키워드 <a href="https://drafts.csswg.org/mediaqueries-5/#boolean-context">boolean context</a>에서 <code>false</code>로 판정됩니다.</dd>
  <dt><code>light</code></dt>
  <dd>사용자가 시스템에 라이트 테마를 사용하는 것을 선호한다고 알렸음을 나타냅니다.</dd>
  <dt><code>dark</code></dt>
  <dd>사용자가 시스템에 다크 테마를 사용하는 것을 선호한다고 알렸음을 나타냅니다.</dd>
</dl>

<h2>예제</h2>

<p>이 예제는 검은 배경에 흰 텍스트를 가진 요소를 라이트 테마를 사용하는 사용자가 볼 경우 색을 반대로 해서 나타냅니다.</p>
              
            
!

CSS

              
                body {
  background: #202b38;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

h1, h2, h3 {
  color: #fff;
}

p, dl {
  color: #dbdbdb;
}

a {
  color: #41adff;
  text-decoration: none;
}

code {
  color: #ffbe85;
  background: #161f27;
  border-radius: 6px;
  padding: 2.5px 5px;
}
              
            
!

JS

              
                
              
            
!
999px

Console