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.

            
              mixin atom-label
    .atom-label Search the site

mixin atom-input
    input.atom-input(placeholder='Enter keyword')

mixin atom-search
    button.atom-search Search

mixin atom-separator
    hr.atom-separator

mixin atom-navigation-item(name)
    - const itemName = name || 'Home'
    a(href='#').atom-navigation-item=itemName

mixin atom-logo
    svg(xmlns='http://www.w3.org/2000/svg', width='150', height='65')
        g#layer1
            path#pathLogo(style='fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1', d='m 0,-1.4e-5 v 1 63 1 h 1 148 1 v -1 -63 -1 H 149 1 Z m 2,2 h 0.32813 l 71.00781,30.5 -71.00781,30.5 H 2 Z m 3.65625,0 h 138.6875 L 75,31.785146 Z m 142.01563,0 H 148 v 61 h -0.32812 l -71.00782,-30.5 z M 75,33.152344 144.34375,62.999986 H 5.65625 Z')


mixin molecule-form-search
    .molecule-form-search
        .molecule-form-search-label
            +atom-label
        .molecule-form-search-fields
            .molecule-form-search-input
                +atom-input
            .molecule-form-search-search
                +atom-search

mixin molecule-navigation
    nav.molecule-navigation
        ul
            li
                +atom-navigation-item
            li
                +atom-navigation-item('About')
            li
                +atom-navigation-item('Blog')
            li
                +atom-navigation-item('Contact')

mixin organism-header
    .organism-header
        .organism-header-logo
            +atom-logo
        .organism-header-navigation
            +molecule-navigation
        .organism-header-form-search
            +molecule-form-search

h2 Atoms
.atomic-example
    .part
        +atom-label
    +atom-separator
    .part
        +atom-input
    +atom-separator
    .part
        +atom-search
    +atom-separator
    .part
        +atom-navigation-item
    +atom-separator
    .part
        +atom-logo

h2 Molecules
.atomic-example
    .part
        +molecule-form-search
    +atom-separator
    .part
        +molecule-navigation
h2 Organisms
.atomic-example-large
    .part
        +organism-header
            
          
!
            
              // Global variables
$atomFontSize: 16px;
$atomFontFamily: 'Oswald', sans-serif;

// Color list

$atomicWhite: #fff;
$atomicPaleGray: #f7f8f8;
$atomicPaleGray2: #EBEAEA;
$atomicGray: #999;
$atomicBlue: #1477B4;
$atomicPaleBlue: #E9F5FC;
$atomicOrange: #ff4e00;
$atomicBlack: #444;

// Components variables
$atomicColorBodyBackground: $atomicPaleGray;

$atomicColorExampleBackground: $atomicWhite;
$atomicColorExampleBorder: $atomicBlack;

$atomColorLabelText: $atomicBlack;

$atomColorInputPlaceholderText: $atomicGray;
$atomColorInputText: $atomicBlack;
$atomColorInputFocusText: $atomicBlue;
$atomColorInputBackground: $atomicPaleGray;
$atomColorInputFocusBackground: $atomicPaleBlue;
$atomColorInputBorder: $atomicGray;

$atomColorSearchText: $atomicOrange;
$atomColorSearchHoverText: $atomicBlack;
$atomColorSearchBackground: $atomicWhite;
$atomColorSearchHoverBackground: $atomicWhite;
$atomColorSearchBorder: $atomicOrange;
$atomColorSearchHoverBorder: $atomicOrange;

$atomColorSeparator: $atomicPaleGray2;

$atomColorNavigationItemText: $atomicBlack;

// Example part
body {
  background-color: $atomicColorBodyBackground;
}

%atomic-example {
  background-color: $atomicColorExampleBackground;
  border: 3px solid $atomicColorExampleBorder;
  box-sizing: border-box;
  margin: auto;
}

.atomic-example {
  @extend %atomic-example;
  width: 500px;
  .part {
    padding: 20px;
  }
}

.atomic-example-large {
  @extend %atomic-example;
  padding: 20px;
}

// Atoms

%atom-font {
  font-weight: normal;
  text-transform: uppercase;
  font-size: $atomFontSize;
  font-family: $atomFontFamily;
}

%atom-field {
  line-height: 44px;
  padding: 0 14px;
  box-sizing: border-box;
}

.atom-label {
  @extend %atom-font;
  color: $atomColorLabelText;
}

input.atom-input {
  @extend %atom-font;
  @extend %atom-field;
  color: $atomColorInputText;
  background-color: $atomColorInputBackground;
  border: 1px solid $atomColorInputBorder;
  &::placeholder {
    color: $atomColorInputPlaceholderText;
  }
  &:focus {
    color: $atomColorInputFocusText;
    background-color: $atomColorInputFocusBackground;
  }
}

button.atom-search {
  @extend %atom-font;
  @extend %atom-field;
  cursor: pointer;
  color: $atomColorSearchText;
  border: 1px solid $atomColorSearchBorder;
  background-color: $atomColorSearchBackground;
  &:hover {
    color: $atomColorSearchHoverText;
    border-color: $atomColorSearchHoverBorder;
    background-color: $atomColorSearchHoverBackground;
  }
}

hr.atom-separator {
  border: 0;
  border-top: 3px solid $atomColorSeparator;
  margin: 0;
}

a.atom-navigation-item {
  font-size: 30px;
  font-weight: normal;
  font-family: $atomFontFamily;
  color: $atomColorNavigationItemText;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

// Molecules

.molecule-form-search {
  .molecule-form-search-fields {
    display: flex;
    flex-wrap: nowrap;
    .molecule-form-search-input {
      margin-right: 8px;
      flex-grow: 1;
      input.atom-input {
        width: 100%;
      }
    }
  }
}

nav.molecule-navigation {
  > ul {
    list-style: none;
    padding: 0;
    display: flex;
    margin: 0;
    > li {
      margin-right: 20px;
      &:last-child {
        margin-right: 0;
      }
    }
  }
}

// Organisms

.organism-header {
  display: flex;
  > [class^="organism-header"] {
    margin-right: 40px;
    align-self: flex-end;
    &:last-child {
      margin-right: 0;
    }
  }
  .organism-header-navigation {
    flex-grow: 1;
  }
  .organism-header-form-search {
    width: 250px;
  }
}
            
          
!
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