Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                .header
  .large-title
    h1 Style Guideline
    hr
  .intro Follow this style guideline to make sure your website is in a way of consistency.
  img.face(src="https://i.imgur.com/WW0mNDi.png", alt="")
.font
  .font1
    .small-title
      h5 Title Font:
        .br Roboto Slab
    .display.slab Aa
  span.font2
    .small-title
      h5 Paragraph Font:
        .br Source Serif Pro
    .display.serif Aa
.size1
  .large
    .small-title
      h5 Big Title:
        .br 40px
    .size-display
      h2 The quick brown fox jumps over the lazy dog.
  span.medium
    .small-title
      h5 Medium Title:
        .br 30px
    .size-display
      h3 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
.size2
  .small
    .small-title
      h5 Small Title:
       .br 20px
    .size-display
      h4 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
  span.paragraph
    .small-title
      h5 Paragraph:
        .br 15px
    .size-display
      p The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.  
.color-button
  .color
    .small-title
      h5 Color System
    .whole-color-block
      .color-block
        .color-number.color1 #ADAB13
        .chip.chip1
          .color-text BRAND
      .color-block
        .color-number.color2 #0E2A9C
        .chip.chip2
          .color-text BRAND
      .color-block
        .color-number.color3 #2B2B2B
        .chip.chip3
          .color-text BRAND
  span.button
    .small-title
      h5 Button
    .whole-button-block
      .button-block1
        .button-type1-color1 Click
        .button-type1-color2 Click
        .button-type1-color3 Click
      .button-block2
        .button-type2-color1 Click
        .button-type2-color2 Click
        .button-type2-color3 Click
              
            
!

CSS

              
                @mixin size($w,$h)
  width: $w
  height: $h

@mixin center
  position: absolute
  left: 50%
  top: 50%
  transform: translateX(-50%) translateY(-50%)
  
@mixin center-horizontal
  position: absolute
  left: 50%
  transform: translateX(-50%)
  
@mixin center-vertical
  position: absolute
  top: 50%
  transform: translateY(-50%)
  
$title-font: Roboto Slab
$paragraph-font: Source Serif Pro

$font-size: 10px

$color1: #ADAB13 
$color2: #0E2A9C
$color3: #2B2B2B

*
  // border: solid 1px
  box-sizing: border-box
  padding: 0px
  margin: 0px

body, html
  min-width: 831px
  color: $color3

.header
  +size(100%,300px)
  position: relative

.font
  +size(100%,300px)
  background-color: $color1
  color: $color2
  
.font1, .font2
  +size(50%,300px)
  display: inline-block
  position: relative
  
.size1, .size2
  +size(100%,300px)
  
.size1
  background-color: $color2
  color: $color1
  
.size2
  background-color: $color3
  color: white
  
.large, .medium, .small, .paragraph
  +size(50%,300px)
  display: inline-block
  position: relative
  
.color-button
  +size(100%,300px)
  
.color, .button
  +size(50%,300px)
  display: inline-block
  position: relative
  
.large-title
  font-family: $title-font
  position: absolute
  top: 25px
  margin-left: 25px
  
hr
  border: 0
  height: 5px
  background-color: $color3
  
.intro
  position: absolute
  top: 150px
  left: 25px
  font-family: $paragraph-font 
  font-size: 1.5*$font-size

.face
  position: absolute
  bottom: 25px
  right: 25px
  width: 60px
  
.small-title
  position: absolute
  top: 25px
  left: 25px
  font-family: $title-font
  
.display
  +center-horizontal
  bottom: 10%
  font-size: 17*$font-size
  font-weight: 900
  
.slab
  font-family: $title-font
  
.serif
  font-family: $paragraph-font
  
.size-display
  +size(100%,auto)
  +center-horizontal
  padding: 25px
  bottom: 10%
  position: absolute
  font-family: $title-font

.whole-color-block
  +size(auto,auto)
  position: relative
  top: 87px

.color-block
  +size(100%,50px)
  position: relative
  
.chip
  +center-vertical
  +size(100px,40px)
  left: 25%
  font-family: $title-font
  
.chip1
  background-color: $color1
  color: $color2
  
.chip2
  background-color: $color2
  color: $color1
  
.chip3
  background-color: $color3
  color: white
  
.color-text
  +center
  text-align: center
  
.color-number
  +center-vertical
  +size(100px,auto)
  right: 25%
  font-family: $title-font
  text-align: center
  
.color1
  color: $color1
  
.color2
  color: $color2
  
.color3
  color: $color3

.whole-button-block
  +size(auto,auto)
  position: relative
  top: 87px
  
.button-block1, .button-block2
  +size(100%,75px)
  position: relative
  font-family: $title-font
  font-size: 30px
  color: $color3
  text-align: center
  
.button-block2
  color: white
  font-size: 2*$font-size
  
.button-type1-color1
  +center-vertical
  +size(80px,40px)
  border-bottom: solid 3px $color1
  left: 15%
  
.button-type1-color2
  +center
  +size(80px,40px)
  border-bottom: solid 3px $color2
  
.button-type1-color3
  +center-vertical
  +size(80px,40px)
  border-bottom: solid 3px $color3
  right: 15%
  
.button-type2-color1
  +center-vertical
  +size(80px,auto)
  background-color: $color1
  left: 15%
  
.button-type2-color2
  +center
  +size(80px,auto)
  background-color: $color2
  
.button-type2-color3
  +center-vertical
  +size(80px,auto)
  background-color: $color3
  right: 15%
  
h1
  font-size: 6*$font-size
  
h2
  font-size: 4*$font-size
  
h3
  font-size: 3*$font-size
  
h4
  font-size: 2*$font-size
  font-weight: 500
  
h5
  font-size: 1.2*$font-size
  
p
  font-size: 1.5*$font-size
  font-family: $paragraph-font
              
            
!

JS

              
                
              
            
!
999px

Console