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

              
                
<h1><span>Example heading</span> sized with the clamp() function!</h1>

<p>This lets you set a <code>min</code>imum font-size, and ideal font-size, and a <code>max</code>imum font-size.</p>

<p><mark>Resize the viewport</mark> (in a horizontal way) to see how it adjusts it's size.</p>

              
            
!

CSS

              
                
h1 {            /*-- stay in here! --*/
  font-size: clamp(30px, 10vw, 100px);
                /* min    ?    max */
                  /* ideal size */
}

/* 

We haven't seen this middle number explained very well.

So, we just play with it until it "works."You can also play with vmin unit - which will be whatever is smaller: width or height of the viewport

It's the "ideal size" / which changes at the various view port sizes... right?










Here's a detailed post
https://blog.bitsrc.io/css-clamp-the-responsive-combination-weve-all-been-waiting-for-f1ce1981ea6e

and - way toooo far down the rabbit hole... 
https://www.smashingmagazine.com/2022/01/modern-fluid-typography-css-clamp/

*/











































html {
  background-color: #faf1e2;
}

h1 span {
  font-family: 'Helvetica', sans-serif;
}
              
            
!

JS

              
                
              
            
!
999px

Console