Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                h2 Radio
.accordion
  .accordion__item
    input#accordion1(
      checked="checked",
      type="radio",
      name="accordion",
      hidden="hidden"
    )
    label.accordion__header(for="accordion1") Accordion1
    .accordion__content 
      | Lorem ipsum dolor sit amet, consectetur adip"isicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordion2(
      checked="checked",
      type="radio",
      name="accordion",
      hidden="hidden"
    )
    label.accordion__header(for="accordion2") Accordion2
    .accordion__content 
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordion3(
      checked="checked",
      type="radio",
      name="accordion",
      hidden="hidden"
    )
    label.accordion__header(for="accordion3") Accordion3
    .accordion__content 
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

h2 Checkbox
.accordion
  .accordion__item
    input#accordionc1(
      checked="true",
      type="checkbox",
      name="accordionc",
      hidden="hidden"
    )
    label.accordion__header(for="accordionc1") Accordion1
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordionc2(hidden="hidden", type="checkbox", name="accordionc")
    label.accordion__header(for="accordionc2") Accordion2
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordionc3(hidden="hidden", type="checkbox", name="accordionc")
    label.accordion__header(for="accordionc3") Accordion3
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

h2 Checkbox Visible
.accordion
  .accordion__item
    input#accordioncv1(checked="true", type="checkbox", name="accordioncv")
    label.accordion__header(for="accordioncv1") Accordion1
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordioncv2(type="checkbox", name="accordioncv")
    label.accordion__header(for="accordioncv2") Accordion2
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    input#accordioncv3(type="checkbox", name="accordioncv")
    label.accordion__header(for="accordioncv3") Accordion3
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

h2 Radio Visible
.accordion
  .accordion__item
    label.accordion__header(for="accordionrv1") Accordion1
    input#accordionrv1(checked="true", type="radio", name="accordionrv")
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    label.accordion__header(for="accordionrv2") Accordion2
    input#accordionrv2(type="radio", name="accordionrv")
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

  .accordion__item
    label.accordion__header(for="accordionrv3") Accordion3
    input#accordionrv3(type="radio", name="accordionrv")
    .accordion__content
      | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit nulla non laboriosam accusamus ex neque sit. Corporis in expedita optio ducimus, id illo, iure hic officia quam qui sapiente veniam!

              
            
!

CSS

              
                /* Reset */

* {
  box-sizing: border-box;
}

// Custom Variables and Mixins

$primary-color: #ed1c2e;
$header-bg: #fff;
$header-color: #333;
$header-padding: 20px;
$radio-size: 15px;
$content-bg: #fff;
$content-color: #333;
$collapse-icon-size: 1.2em;
$collapse-icon-color: $primary-color;
$border-color: #dddddd;

// Optional
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.accordion {
  max-width: 860px;
  margin: 20px;
}

h2 {
  color: $primary-color;
  font-size: 25px;
  font-weight: normal;
  margin: 5px;
  display: block;
}

// Core Style
.accordion {
  border: 1px solid #dddddd;

  &__header {
    width: 100%;
    background-color: $header-bg;
    color: $header-color;
    font-size: 20px;
    font-weight: normal;
    display: flex;
    align-items: center;
    cursor: s-resize;
    position: relative;
    padding: $header-padding;
    border-top: 1px solid $border-color;

    &:after {
      display: none;
      content: "+";
      transform-origin: center;
      font-size: $collapse-icon-size;
      color: $collapse-icon-color;
      margin-right: 0;
      margin-left: auto;
      transition: transform 200ms ease-out;
    }
  }

  &__item {
    position: relative;
    overflow: hidden;

    &:hover {
      .accordion__header {
        color: $primary-color;
      }
    }

    &:first-child {
      .accordion__header {
        border-top: none;
      }
    }
  }

  &__content {
    padding: 0px 20px;
    height: 0px;
    background-color: $content-bg;
    color: $content-color;
    overflow: hidden;
    transition: padding 200ms ease-in-out;
  }

  input[type="radio"],
  input[type="checkbox"] {
    position: absolute;
    top: $radio-size;
    right: $radio-size;
    width: $radio-size;
    height: $radio-size;
    border: 0px;
    z-index: 999;

    &[hidden="hidden"] {
      visiblity: hidden;
      top: -100%;

      + .accordion__header {
        &:after {
          display: block;
        }
      }
    }

    &:focus {
      outline: none;
    }

    &:checked {
      ~ .accordion__content {
        padding: 0px 20px 20px 20px;
        height: auto;
      }

      + .accordion__header {
        color: $primary-color;

        &:after {
          transform: rotate(-45deg);
        }
      }
    }
  }
}

              
            
!

JS

              
                /* No js  Enes Sefa Küccük*/ 
/*
CSS Hover Button
https://codepen.io/EnesSefaK/pen/vXYrVN
*/

/* 
  SASS'DAN CSS'E ÇEVİRMEK İÇİN CSS SEKMESİNDEN AÇILIR MENUYU AÇIN VE VİEW COMPİLED CSS SEÇENEĞİNİ TIKLAYIN
*/
              
            
!
999px

Console