cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

              <h1>Using CSS Variables</h1>

<div class="example">
        Made a meal and threw it up on Sunday
        <br>I've gotta lot of things to learn
        <br>Said I would and I'll be leaving one day
        <br>Before my heart starts to burn

    <p>So what's the matter with you?
        <br>Sing me something new
        <br>Don't you know the cold and wind and rain don't know
        <br>They only seem to come and go away
    <cite>~ <a href="https://www.youtube.com/watch?v=maTP315XZCQ" title="Stand by Me by Oasis on YouTube">Stand by Me by Oasis</a></cite>

<div class="content">
    <p>In case the browser does not support CSS Variables, it will read <code>color: red;</code> as the rule for the selector <code>cite a</code>.</p>
    <p>In any other case, it will read the second rule which contains the variable name <code>color: var(--cite-link--color);</code>. It's important to note that it should be below the non-variable rule to override it.</p>
              /* Variables */
    /* Absolute */
    --panda-blue--color: #005fe6;

    /* Generic */
    --color--accent-pri: var(--panda-blue--color);

    /* Specific */
    --cite-link--color: var(--color--accent-pri);

/* Cite Link */
cite a
    color: red;
    color: var(--cite-link--color);
    text-decoration: none;

cite a:hover
    text-decoration: underline;

    /* Text Formatting */
    font-size: 1.125rem;
    line-height: 1.6;
    font-family: sans-serif;

    background-color: #f2f2f2;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................