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


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.


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.


                <h1>Flex order Example</h1>
<p>You can re-arrange the child items in assending order by adding value in the below textbox using flex order</p>
<div class="controller">
 <label for="child1">child 1 : <input type="number" id="child1"/>
 <label for="child2">child 2 : <input type="number" id="child2"/>
 <label for="child3">child 3 : <input type="number" id="child3"/>
 <label for="child4">child 4 : <input type="number" id="child4"/>
 <label for="child5">child 5 : <input type="number" id="child5"/>

<div class="flex-parent">
  <div class="child-item child1">
    child-item 1
  <div class="child-item child3">
    child-item 3
  <div class="child-item child4">
    child-item 4
  <div class="child-item child2">
    child-item 2
  <div class="child-item child5">
    child-item 5
<h4>order: <span>number ; </span></h4>



                @import "compass";

@import url(,400,600,700,800);
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

body {
  background-color: #c03546;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  padding: 30px 50px;
  color: #fff;
  border-top: solid 5px #13C4A3;
  padding: 10px;
  width: 60%;
  background-color: #fff;
  color: #000;
  margin: 0 auto 40px;
h1 {
  color: #fff;
  font-size: 24px;
  display: block;
  padding-bottom: 10px;
  text-transform: uppercase;
h4 {
  color: #fff;
  font-size: 14px;
  display: block;
  font-weight: 400;
  margin: 10px 0 30px;
  margin-bottom: 20px;
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
      width: 50px;
      padding: 5px;
.flex-parent {
  border: solid 1px #fff; 
  @include display-flex; 
  .child-item {
    background-color: #fff;
    color: #000; 
    padding: 30px 10px;
    margin: 10px;
    font-size: 13px;
    width: 100px;
    font-weight: 600;

//Flex demo here


                //demo purpose only
$('.controller input').bind("change", function() {
  var item = $(this).attr('id');
  var value = $(this).val(); 
  $('.'+item).css({'order': value });
    $('.'+item).css({'order': '' });
  /* if(isNaN(value)) {
    $('h4 span').text(value + ';' );
    $('h4 span').text(value + 'px;' );
  } */