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

              
                  
<!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Растин Спенсер Коул</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@100;400;700&display=swap" rel="stylesheet">
</head>
<body>
  <header class="header">
    <a href="/" class="logo">
      <svg viewBox="0 0 64 64" width="64" height="64">
        <circle cx="32" cy="32" r="30"></circle>
      </svg>
    </a>
    <nav class="nav">
      <ul>
        <li><a href="/design/">Дизайн</a></li>
        <li><a href="/music/">Музыка</a></li>
        <li><a href="/chess/">Шахматы</a></li>
      </ul>
    </nav>
  </header>

  <section class="about">
    <div class="lead">
      <p>
        Привет! Я — Растин Спенсер Коул,
        дизайнер, музыкант и гроссмейстер. Проектирую <a href="/websites/">сайты</a>,
        <a href="/apps/">приложения</a> и <a href="/wayfinding/">системы навигации</a>
        в общественных местах.
        Пишу <a href="https://www.last.fm/music/Mick+Gordon">музыку</a>,
        играю <a href="https://chessarena.com/profile/218782">в шахматы</a>.
      </p>
    </div>
  </section>
</body>
</html>

              
            
!

CSS

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

ul {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

svg {
  max-width: 100%;
  max-height: 100%;
}

:root {
  --textColor: #282828;
  --backgroundColor: rgba(247, 247, 247,.8);
  --keyColor: #00b2ff;
  --linkColor: var(--textColor);
  --linkUnderlineColor: color-mix(in srgb, var(--keyColor) 50%, rgba(255, 255, 255, 0));
}

@media (prefers-color-scheme: dark) {
  :root {
    --textColor: #fff;
    --backgroundColor: #0f0f0f;
  }
}

body {
  font: 1em/1.25 IBM Plex Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
  color: var(--textColor);
  background-color: var(--backgroundColor);
  margin: 0;
  padding: .5rem clamp(1.43rem, 2.5vw, 2.84rem) 3rem;
}

a {
  color: var(--linkColor);
  text-decoration: underline;
  text-decoration-color: var(--linkUnderlineColor);
  text-decoration-thickness: .0625em;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--keyColor);
}

.header {
  font-size: 1.5rem;
  display: grid;
  grid-template-columns: min-content 1fr;
  align-items: center;
}


.logo {
  width: 1.75em;
  height: 1.75em;
  margin-right: 1.5em;
  fill: var(--keyColor);
}

.nav ul {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: end;
  column-gap: 1em;
}

.lead {
  font-size: clamp(2.5rem, 5vw, 5rem);
}

.lead p {
  max-width: 18em;
}

.about {
  padding-top: 1.5vh;
}

@media (width <= 640px) {
  html {
    font-size: 14px;
  }
  
  .header {
    font-size: 1rem;
  }
  
  .nav ul {
    column-gap: 1.5em;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console