cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <!-- Feel free to add or remove elements -->
<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
</ul>
            
          
!
            
              @import "compass/css3";

@mixin round-corner-grid($n-columns, $corner-radius: 1em) {
  $unit-width: 100%/$n-columns;

  li {
    float: left;
    width: $unit-width;
  }
  
  /* Target the first box in the first row */
  li:first-child {
    @include border-top-left-radius($corner-radius);
  }
  
  /* Target the last box in the first row in the last column */
  li:nth-child(#{$n-columns}) {
    @include border-top-right-radius($corner-radius);
  }
  
  /* Target the first box in the last row */
  li:nth-child(#{$n-columns}n+1) {
    @for $i from 1 through $n-columns {
      &:nth-last-child(#{$i}) {
        @include border-bottom-left-radius($corner-radius);
      }
    }
  } 
  
  /* Target the last box in the last row in the last column */
  li:nth-child(#{$n-columns}n+#{$n-columns}):last-child {
    @include border-bottom-right-radius($corner-radius);
  }
    
}

ul {
  @include round-corner-grid(3); /* Feel free to change parameters here */
  line-height: 10em;
  width: 30em;
}

li {
  @include box-sizing(border-box);
  border: 1px solid white;
  list-style: none;
  color: white;
  background: #268bd2;
  text-align: center;
}


            
          
!
999px
Loading ..................

Console