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

              
                <div class="c-timer">
    <div class="c-timer__clock">
        <div class="c-timer__clock--progress" style="--p: 75"></div>
        <div class="c-timer__clock--face">
            <h1 id="timer" class="c-timer__clock--time" contenteditable="true">15:00</h1>
            <div class="c-timer__clock--button">
                <button name="start" class="" type="button">start</button>
            </div>
            <div class="c-timer__clock--settings">
                <button name="settings" class="" type="button" onclick="focusTimer()">
                    <svg id="icon-cog" aria-hidden="true" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d_108_7)"><path d="M28 14V10H23.714C23.526 9.274 23.238 8.592 22.866 7.962L25.898 4.93L23.07 2.1L20.04 5.132C19.406 4.76 18.726 4.472 18 4.284V0H14V4.284C13.274 4.474 12.594 4.76 11.96 5.134L8.93 2.1L6.102 4.928L9.132 7.96C8.762 8.592 8.472 9.272 8.286 10H4V14H8.286C8.474 14.726 8.762 15.408 9.134 16.038L6.102 19.072L8.93 21.9L11.962 18.868C12.594 19.24 13.274 19.528 14.002 19.718V24H18.002V19.716C18.728 19.526 19.408 19.238 20.042 18.866L23.074 21.898L25.902 19.07L22.87 16.036C23.242 15.406 23.53 14.726 23.718 13.998H28V14ZM16 16C13.792 16 12 14.206 12 12C12 9.796 13.792 8 16 8C18.208 8 20 9.796 20 12C20 14.204 18.208 16 16 16Z" fill="#ffffff"/></g><defs><filter id="filter0_d_108_7" x="0" y="0" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="4"/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_108_7"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_108_7" result="shape"/></filter></defs></svg>
                    <span class="sr-only">settings</span>
                </button>
            </div>                
        </div>
    </div>
</div>
              
            
!

CSS

              
                @font-face {
  font-family: 'Bebas Neue';
  src:  url('https://codepen.davidroessli.com/fonts/bebasneue-book-webfont.woff2') format('woff2'),
        url('https://codepen.davidroessli.com/fonts/bebasneue-book-webfont.woff') format('woff');
}
:root {
  --tool-color: #585858;
  --tool-color-hover: white;
  --clock-color: white;
  --progress-color: #900A0A;
  --clock-width: 500px;
  --progress-width: 18px;
}
body {
  background: radial-gradient(71.4% 71.4% at 51.7% 28.6%, #3A393F 0%, #17171A 100%);
  color:#fff;
}
.c-timer {
  height:100vh;
  width:100vw;
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.c-timer__clock {
  position: relative;
  width: var(--clock-width);
  height: var(--clock-width);
  border-radius: 50%;
  background: radial-gradient(71.4% 71.4% at 51.7% 28.6%, #3A393F 0%, #17171A 100%);
  box-shadow: inset 0px 0px 114px rgba(0, 0, 0, 0.45);

}
.c-timer__clock--progress {
  width: var(--clock-width);
  height: var(--clock-width);
  background:conic-gradient(from 90deg, black calc((100 - var(--p)) * 1%), var(--progress-color) 0);
  border-radius: 50%;
}
.c-timer__clock--face {
  position: absolute;
  top: calc(var(--progress-width) / 2);
  left: calc(var(--progress-width) / 2);
  width: calc(var(--clock-width) - var(--progress-width));
  height: calc(var(--clock-width) - var(--progress-width));

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: radial-gradient(71.4% 71.4% at 51.7% 28.6%, #3A393F 0%, #17171A 100%);
  box-shadow: inset 0px 0px 114px rgba(0, 0, 0, 0.45);
}
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 196px;
  line-height: 196px;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);

  margin-top: 20%;
}
[name="start"] {
  font-family: Montserrat;
  font-style: normal;
  font-weight: bold;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  letter-spacing: 0.6em;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);

  color: var(--clock-color);
  text-transform:uppercase;
  transition: transform 0.25s ease-in-out;
}
[name="start"]:focus,
[name="start"]:hover {
  color: var(--tool-color-hover);
  transform: scale(1.3);
}
[name="settings"] #icon-cog g path {
  fill: var(--tool-color);
  transition: fill 0.25s ease-in-out;
}
[name="settings"]:focus #icon-cog g path,
[name="settings"]:hover #icon-cog g path {
  fill: var(--tool-color-hover);
}

              
            
!

JS

              
                /*
  Not much functionality by lack of time -- this is the advent of CSS after all ;)
*/
focusTimer = function getFocus() {
  document.getElementById("timer").focus();
}
              
            
!
999px

Console