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.


                <section class="container" ng-controller="FlexboxCtrl as $ctrl">
  <h2 class="text-center">Wrapper <code>justify-content: <select class="inpu-sm" ng-options="option as for option in $ctrl.justifyOptions track by" ng-model="$ctrl.justifyContent"></select> ;</code></h2>
  <p class="text-center">Try this sample in full view and add at least two more elements for "space-around" and "space-between" differences!</p>
  <ul class="c-blurbs list-unstyled justify-content__{{$}}">
    <li class="c-blurbs__item" ng-repeat="blurb in $ctrl.blurbs track by $index">
        <img class="c-blurbs__item__img" src="" alt="Blurb subject">
          <h4>Some blurb element</h4>
          <p>Lorem ipsum dolor sit amet.</p>
          <button class="btn btn-danger btn-block" ng-click="$ctrl.removeElement($index)"><i class="glyphicon glyphicon-trash"></i></button>
  <button class="btn btn-success btn-block" ng-click="$ctrl.addElement()"><i class="glyphicon glyphicon-plus"></i></button>


                $blue: #3863A0;
$green: #3DBE8B;

  display: flex;
  flex-wrap: wrap;
  text-align: center;
    &__flex-start{justify-content: flex-start;}
    &__flex-end{justify-content: flex-end;}
    &__center{justify-content: center;}
    &__space-around{justify-content: space-around;}
    &__space-between{justify-content: space-between;}
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    width: calc(33.33% - 60px); // Due to issues with IE and box-sizing: border-box this is the best workaround
    padding: 30px;
    box-sizing: content-box;
    position: relative;
      max-width: 120px;
      margin: 0;
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      opacity: 0;
      transition: all 200ms;
        opacity: 1;
    @media only screen and (max-width: 768px) and (min-width: 641px){
      width: calc(50% - 60px);
    @media only screen and (max-width: 640px){
      width: calc(100% - 60px);


  'use strict';
  // Define app and elements
  angular.module("flexbox", ['ngSanitize'])
    // Flexbox controller (called from the component)
    .controller('FlexboxCtrl', FlexboxCtrl);

  // Dependencies injections
  //FlexboxCtrl.$inject = [];

  // Flexbox controller (hoists)
  function FlexboxCtrl(){
    var $ctrl = this;
    $ctrl.justifyOptions = [
      {id: 1, name: "flex-start"},
      {id: 2, name: "flex-end"},
      {id: 3, name: "center"},
      {id: 4, name: "space-around"},
      {id: 5, name: "space-between"}
    $ctrl.justifyContent = $ctrl.justifyOptions[0];
    $ctrl.blurbs = [
    $ctrl.removeElement = removeElement;
    $ctrl.addElement = addElement;
    function removeElement(index){
      $ctrl.blurbs.splice(index, 1);
    function addElement(){
  // Run app
  angular.bootstrap(document, ['flexbox']);