Pen Settings



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


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


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.


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.


                <h1>CSS Custom Properties</h1>
<p>View the instructions in the warning and info callouts below to finish their styles.</p>
  <div class="callout">
    <h2>I am a regular callout</h2>
    <p>Each callout has 2 buttons, a default one and an outline button.</p>
    <div class="btn-group">
      <button class="btn">Button</button>
      <button class="btn outline">Outline Button</button>

  <div class="callout warning">
    <h2>I am a warning callout</h2>
    <p>The warning callout styles are mostly complete other than the missing outline button styles. Can you add this variation?</p>
    <div class="btn-group">
      <button class="btn">Button</button>
      <button class="btn outline">Outline Button</button>

  <div class="callout info">
    <h2>This info callout needs a new theme.</h2>
    <p>Can you use CSS Custom Properties to make sure the info callout and its buttons appear different from the regular and warning callouts?</p>
    <div class="btn-group">
      <button class="btn">Button</button>
      <button class="btn outline">Outline Button</button>


                html {
  --neutral: color(display-p3 0.3409 0.3147 0.3251);
  --neutral-dark: color(display-p3 0.1 0.0052 0.0305);
  --neutral-light: color(display-p3 0.6621 0.6183 0.6563);

.callout {
  background-color: var(--callout-background, white);
  border-color: var(--callout-border-color, var(--neutral-light));
  color: var(--callout-color, var(--neutral-dark));

.warning {
  --callout-background: hsl(338 70% 90%);
  --callout-border-color: hsl(338 70% 64%);
  --btn-background: hsl(330, 80%, 39%);
  --btn-background-hover: hsl(330, 80%, 25%);
  --btn-color: hsl(338 5% 95%);
  --btn-color-hover: hsl(330, 80%, 100%);
  --btn-border-color-hover: var(--btn-background);
  --btn-background-outline: ;
  --btn-border-color-outline: ;
  --btn-color-outline: ;
  --btn-background-outline-hover: ;
  --btn-border-color-outline-hover: ;
  --btn-color-outline-hover: ; 

.info {

/* Base Button Styles with Fallback Values 
   --------------------------------------- */
.btn {
  background-color: var(--btn-background, var(--neutral));
  border: 1px solid var(--btn-border-color, var(--neutral));
  color: var(--btn-color, white);

  &:focus {
    background-color: var(--btn-background-hover, var(--neutral-dark));
    border-color: var(--btn-border-color-hover, var(--neutral-dark));
    color: var(--btn-color-hover, white);

/* Outline Button variation */
.outline {
  --btn-background: var(
    var(--callout-background, transparent)
  --btn-border-color: var(--btn-border-color-outline, var(--neutral));
  --btn-color: var(--btn-color-outline, var(--neutral));
  --btn-background-hover: var(--btn-background-outline-hover, var(--neutral));
  --btn-border-color-hover: var(
  --btn-color-hover: var(--btn-color-outline-hover, white);

/* All Styles that aren't part of workshop, but help with the styling of the demo. */
body {
  background: hsl(213 20% 20%);
  color: white;
  font-family: "Red Hat Display", sans-serif;
  font-size: min(1.1rem + 0.15vw, 1.5rem);
  line-height: 1.4;
  padding: 0 2rem;

/* Layout Styles
   ------------- */
main {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(auto, 80ch);
  justify-content: center;

aside {
  margin-block: 2rem;

/* Button Styles 
   ------------- */
.btn {
  appearance: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0.5rem 1rem;

  &:focus {
    outline: 2px solid var(--btn-focus-outline-color, hsl(338 85% 60%));
    outline-offset: 1px;

/* Callout Styles 
.callout {
  border-radius: 1rem;
  border-style: solid;
  border-width: 0 0 0 1rem;
  padding: 2rem;

/* Typography Styles
   ----------------- */
h1 {
  font-size: min(3.5rem + 1vw, 5rem);
  font-weight: normal;
  margin-block-end: 1rem;
  text-align: center;

h2 {
  font-size: min(1.5rem + 1vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;

p:not(.callout p) {
  font-size: calc(1rem + 0.5vw);
  margin-block-end: 2rem;
  text-align: center;



                // Layers by Rio pratam from <a href="" target="_blank" title="Layers Icons">Noun Project</a> (CC BY 3.0)
// Crop by Rio pratam from <a href="" target="_blank" title="Crop Icons">Noun Project</a> (CC BY 3.0)