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.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              - var clubs = ["bournemouth", "arsenal", "brighton", "burnley", "chelsea", "palace", "everton", "huddersfield", "leicester", "liverpool", "citeh", "united", "newcastle", "southampton", "swansea", "stoke", "spurs", "watford", "west-brom", "west-ham"];
div
  h1 Premier League Kits 2017/18
  p
    em (Rendered with CSS)
  for club in clubs
    div(class="kit "+club)
      span(class="front")
        span.neck
        span.badge
        span.brand
        span.sponsor
      span.sleeve.sleeve-r
      span.sleeve.sleeve-l
      span.name= club
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Trocchi');
// name, shirt, sleeves, sleeveedge, stripes, stripecolour
$clubs: 
  (bournemouth, #fb2040, #fb2040, 0, 3, #0e1011),
  (arsenal, #cd3846, #ebeced, 45px),
  (brighton, #00299a, #1461c1, 0, 4, #fafafe),
  (burnley, #7f0020, #97f2fc, 45px),
  (chelsea, #033472, #033472, 45px),
  (palace, #d7002e, #d7002e, 15px, 3, #0054a2),
  (everton, #2c4e9a, #1a3a81, 2px),  
  (huddersfield, #0077d4, #f3f0f1, 0, 3, #f3f0f1),
  (leicester, #1e56a3, #1e56a3, 45px),
  (liverpool, #970024, #f3f0f1, 2px),
  (citeh, #87b1db, #6d97c0, 2px),
  (united, #ce003b, #b10738, 2px),  
  (newcastle, #efefed, #1e1e20, 45px, 4, #1e1e20),
  (southampton, #ebeced, #bf0022, 45px),
  (swansea, #f6f6f6, #1e1e20, 2px),  
  (stoke, #f6f6f6, #fe0020, 2px, 3, #fe0020),
  (spurs, #fff, #fff, 45px),
  (watford, #e0c24b, #64272f, 2px),
  (west-brom, #133064, #133064, 0, 4, #eaf0ec),  
  (west-ham, #631b32, #84dbf0, 35px),  
  ;

@each $clubName, $shirt, $sleeves, $sleeveWidth, $stripes, $stripeColour in $clubs {
  .kit.#{$clubName} {
    .front {
      background-color: $shirt;
      border-top: 2px solid $sleeves;
      border-bottom: 5px solid rgba(darken($shirt,10%),0.3);
    }
    .neck {border-top-color: $sleeves}
    .badge {background-color: lighten($shirt,10%);}
    .sponsor {background-color: darken($shirt,10%);}
    .brand {background-color: lighten($sleeves,10%);}
    .sleeve {
      background: $shirt; 
      border-color: $sleeves; 
      border-width: $sleeveWidth;
      &:after {
        content: ''; width: 100%; height: 10px; display: block;
        position: absolute; bottom: 0;
        border-bottom: 5px solid rgba(darken($sleeves,5%),0.15);
      }
    }

    @if $stripes==3 {
      .front {
        background-image: repeating-linear-gradient(90deg, $shirt 0, $stripeColour 0, $stripeColour 18px, $shirt calc(18px + 1px), $shirt 36px);
      }
    }

    @if $stripes==4 {
      .front {
        background-image: repeating-linear-gradient(90deg, $shirt 0, $stripeColour 0, $stripeColour 10px, $shirt calc(10px + 1px), $shirt 20px);
      }
    }
    
  }
}

body {
  font-family: "Trocchi";
  background: #F9E682; //#46C5D9;
  text-align: center;
  background-image: linear-gradient(45deg, #f98488, #46C5D9, #f6cb56);
}
span {
  display: block;
  position: absolute;
  box-sizing: border-box;
}

h1 {
  border: 8px solid #46C5D9;
  padding: 0.6em;
  display: inline-block;
  outline: 8px solid #fff;
}

p {
  margin-top: 0;
  em {
    font-style: normal;
    display: inline-block;
    border-bottom: 5px solid #f98488;
    padding: 0.6em;
  }
}

.kit {
  width: 180px;
  height: 180px;
  margin: 10px 5px;
  position: relative;
  overflow: hidden;
  display: inline-block;
  &:hover {
    border-color: #dee8e8;
    background: radial-gradient(ellipse at center, rgba(255,240,79,1) 0%, rgba(255,254,247,0) 66%, rgba(255,255,255,0) 69%);
  }
}

.front {
  width: 90px;
  height: 150px;
  left: 45px;
  box-shadow: 0 0 10px rgba(0,0,0,0.10);
  z-index: 2;
  border-top: 8px solid transparent;
  border-bottom: 5px solid transparent;
}

.badge {
  width: 15px; height: 15px;
  background: gold;
  opacity: 0.5;
  right: 15px;
  top: 25px;
}

.brand {
  width: 15px; height: 5px;
  background: #121212;
  opacity: 0.4;
  left: 15px;
  top:30px;
}

.sponsor {
  width: 54px; height: 20px;
  background: #121212;
  opacity: 0.3;
  left: 19px;
  top:55px;
}

.neck {
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 16px solid darken(gold,10%);
  top: 0px;
  left: 25px;
  position: relative;
  &:after {
    display: block;
    top: -19px; left: -20px; position: relative;
    content: '';
    width: 0; 
    height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 16px solid darken(#917E92,10%);
  }
}

.sleeve {
  width:50px;
  height: 60px;
  z-index: 1;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);

  &-l {
    left: 20px;
    transform: rotate(55deg);
    border-left: 4px solid transparent;
  }
  &-r {
    left: 108px;
    transform: rotate(-55deg);
    border-right: 4px solid transparent;
  }  
}

.name {
  position: absolute;
  bottom: 0; width: 100%;
  text-align: center;
  text-transform: capitalize;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console