Pen Settings

HTML

CSS

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

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

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.

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>min-width</h1>

<figure class="demo">
  <p class="min min600">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 80% / Minimum Width = 600px</figcaption>
</figure>

<figure class="demo">
  <p class="min min320">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 100% / Minimum Width = 320px</figcaption>
</figure>

<figure class="demo">
  <p class="min min480">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 600px / Minimum Width = 480px (won't work)</figcaption>
</figure>

<figure class="demo">
  <p class="min min-percent">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 100% / Minimum Width = 50% (won't work)</figcaption>
</figure>

<figure class="demo">
  <p class="min em40">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 100% / Minimum Width = 40em</figcaption>
</figure>

<figure class="demo">
  <p class="min rem40">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
  <figcaption>Width = 100% / Minimum Width = 40rem</figcaption>
</figure>

<h3>Tables</h3>
<figure class="demo">
  <table class="min mintable">
		<thead>
			<tr>
				<th class="chrome"><span>Chrome</span></th>
				<th class="safari"><span>Safari</span></th>
				<th class="firefox"><span>Firefox</span></th>
				<th class="opera"><span>Opera</span></th>
				<th class="ie"><span>IE</span></th>
				<th class="android"><span>Android</span></th>
				<th class="iOS"><span>iOS</span></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="yep-nope">24+</td>
				<td class="yep-nope">5.1+</td>
				<td class="yep-nope">18+</td>
				<td class="yep-nope">12.1+</td>
				<td class="yep-nope">8+</td>
				<td class="yep-nope">1.0+</td>
				<td class="yep-nope">2.1+</td>
			</tr>
		</tbody>
	</table>
  <figcaption>Width = 100% / Minimum Width = 600px</figcaption>
</figure>

<footer>
  <p><small>*These examples use the entire viewport width in order to understand and grasp the concepts outlined. Squeeze your browser to witness the results.</small></p>
</footer>
              
            
!

CSS

              
                @import "compass/css3";

//========================================
// $Global Styles
//========================================

html {
  background: #444444;
  color: #ffffff;
}

.demo {
  background: #000;
}

//========================================
// $Minimum Width Demo
//========================================

.min {
  background: #e78629;
}

// Min-Width Length Values
// ========================================

// minimum 600px
.min600 {
  width: 80%;
  min-width: 600px;
}

// minimum 320px
.min320 {
  width: 100%;
  min-width: 320px;
}

// minimum 480px
.min480 {
  width: 600px;
  min-width: 480px;
}

// minimum 50%
.min-percent {
  width: 100%;
  min-width: 50%;
}

// minimum 40em
.rem40 {
  width: 100%;
  min-width: 40em;
}

// minimum 40rem
.rem40 {
  width: 100%;
  min-width: 40rem;
}


// Min-Width TABLES
// ========================================

// minimum 30em
.mintable {
  width: 100%;
  min-width: 600px;
}
              
            
!

JS

              
                
              
            
!
999px

Console