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.


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 class="textcenter"><a href="">APG-FLEX</a></h1>

<p class="textcenter">– Resize your window to see the order of the collapses: purple > green > red > blue (grey never collapes) –</p>

<div class="arowsm acontainer">
      <li><a href="">Presentation and Demo</a></li>
      <li><a href="">Code on Github</a></li>
    <h2>Complete Example</h2>
<div class="demo">
  <div class="arow"><!-- arow : no collapse -->
    <div>A</div> <!-- div : style = "flex: 1" -->
  <div class="arowsm acontainer">  <!-- arowsm : collapse at 576px ; acontainer : "max-width: 1070px" -->
    <div class="flex3">M (flex3)</div> <!-- flex3 : style="flex: 3" -->
  <div class="arow">
      <div class="arowxl acontainer">
        <div class="flex6">P (flex6)
          <div class="arowmd">
              <div class="arowsm">
                  <div class="arowmd">
                  <div class="arowsm">
              <div class="arowlg">
</div> <!-- /demo -->

<div class="arowsm acontainer">
    <h2>Inverted collapse Example</h2>
<div class="demo">
    @media(max-width: 576px) {
      .dhidden-xs {
        display: none;
  <div class="arowsm acontainer">
      <div class="browsm">
        <div class="acolfinal text-center">A</div>
        <div class="acolfinal text-center">B</div>
    <div class="acolfinal text-center dhidden-xs">C</div>


APG-FLEX v 2.O (2020-02-11) 

.acontainer	{display:block;max-width:1170px;margin:0 auto !important}
.acolfinal 	{padding:.5rem}

.arow		{display:flex;margin:0;padding:0}

.browxl 	{display:flex}

@media(min-width:576px) {.arowsm{display:flex}.browsm{display:block}}
@media(min-width:768px) {.arowmd{display:flex}.browmd{display:block}}
@media(min-width:992px) {.arowlg{display:flex}.browlg{display:block}}

.browxl>div	 {flex:1}

.flex2 	{flex:2!important}
.flex3 	{flex:3!important}
.flex4 	{flex:4!important}
.flex5 	{flex:5!important}
.flex6 	{flex:6!important}
.flex7 	{flex:7!important}
.flex8 	{flex:8!important}
.flex9 	{flex:9!important}
.flex10 {flex:10!important}
.flex11 {flex:11!important}
.flex12 {flex:12!important}

/* Just for Presentation and colorization*/
html {font-family: "Open Sans", Lato, Helvetica, "sans serif" }
a {color: darkred; text-decoration: none;}
h1, h2 {font-weight: bold; margin-top: 1em;}
.textcenter {text-align: center;}
h2 {border-bottom: 1px solid #12bbad}
.demo div {text-align: center;} 
.demo {color: white;}
.demo .arow > div {border: 1px solid white; background-color: lightslategray; color: white;}
.demo .arowsm > div {border: 1px solid lightblue; background-color: darkblue; color: white;}
.demo .arowmd > div {border: 1px solid red; background-color: darkred; color: white;}
.demo .arowlg > div {border: 1px solid lightgreen; background-color: darkgreen; color: white;}
.demo .arowxl > div {border: 1px solid black; background-color: purple; color: white;}