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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              .row
  .cell
    .dropdown.active
      %a.icon{:href => "#"}
        %svg{:width => "24", :height => "24"}
          %use{"xlink:href" => "#icn-bell"}
      %ul.dropdown-menu
        %li.bucket.ad1
          .bucket-media
          .bucket-content
            .bucket-item
            .bucket-item
        %li.bucket.ad2
          .bucket-media
          .bucket-content
            .bucket-item
            .bucket-item
        %li.bucket.ad3
          .bucket-media
          .bucket-content
            .bucket-item
            .bucket-item
        
        
<!-- Svg Icons -->

%svg.dn.nc-icon.outline{:height => "24px", :viewbox => "0 0 24 24", :width => "24px", :x => "0px", :xmlns => "http://www.w3.org/2000/svg", "xmlns:xlink" => "http://www.w3.org/1999/xlink", :y => "0px"}
  %g#icn-bell{:transform => "translate(0, 0)"}
    %path{:d => "M9,19.9c0,0,0,0.1,0,0.1 c0,1.7,1.3,3,3,3s3-1.3,3-3c0,0,0-0.1,0-0.1", "data-cap" => "butt", "data-color" => "color-2", :fill => "none", :stroke => "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-miterlimit" => "10", "stroke-width" => "2"}
    %path{:d => "M19,11c0-1.6,0-3,0-3 c0-3.9-3.1-7-7-7S5,4.1,5,8c0,0,0,1.4,0,3c0,3.3-3,4.1-3,6c0,1.7,3.9,3,10,3s10-1.3,10-3C22,15.1,19,14.3,19,11z", :fill => "none", :stroke => "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-miterlimit" => "10", "stroke-width" => "2"}
            
          
!
            
              /* Base Variables */

$b-space: 20px
$b-space-s: $b-space / 2
$b-maxWidth: 200px
$b-radius: 4px
  
/* Base */

.dropdown-menu
  list-style-type: none
  border-radius: $b-radius
  background: darken(#9A55A1,10%)
  padding: 0
  display: block
  position: relative
  &::before
    content: ""
    position: absolute
    top: -10px
    left: 10px
    width: 0
    text-align: center
    height: 0
    border-style: solid
    border-width: 0 10px 10px 10px
    border-color: transparent transparent darken(#9A55A1,10%) transparent
  
li
  padding: $b-space
  border-bottom: 2px solid darken(#9A55A1,20%)
  
  &:last-child
    border-bottom: 0
  
/* Layout */

body
  background: #ddd
  
.row
  padding: 0 $b-space
  background: #ececec
  
.cell
  margin-left: auto
  margin-right: auto
  max-width: $b-maxWidth
  position: relative

/* Bucket */

.bucket
  display: flex
  flex-direction: row
  opacity: 0
  transform: translateY(-10px)
  
.active
  .bucket.ad1
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    
  .bucket.ad2
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 0.5s
    
  .bucket.ad3
    animation: fadeIn 1.5s forwards, slideDown 0.3s forwards
    animation-delay: 1s
  
.bucket-media
  background: #E9B1D2
  height: 30px
  width: 30px
  margin-right: 10px
  border-radius: $b-radius
  &:hover
    animation: pulse 0.5s
  
.bucket-content
  flex-grow: 1
  
.bucket-item
  background: #FFC609
  padding: 5px
  flex-direction: column
  margin-bottom: 10px
  border-radius: $b-radius
  
.bucket-item:last-child
  margin-bottom: 0
  
/* Dropdown */

.dropdown
  padding: $b-space-s 0
  
.dropdown-menu
  position: absolute
  min-width: 250px

/* Icon */

.icon
  color: #363F45
  margin-left: 8px
  
.active
  .icon
    color: #9A55A1
    animation: ring 0.3s linear
    animation-iteration-count: 3
   
/* Tools */

.dn
  display: none
  
.hidden
  opacity: 0
  visibility: hidden
    
/* Animations */

@keyframes fadeIn
  from
    opacity: 0
  to
    opacity: 1
  
@keyframes ring
  0%, 100%
    transform: rotate(0)
  25%
    transform: rotate(-30deg)
  75%
    transform: rotate(30deg)

@keyframes slideDown
  0%
    transform: translateY(-10px)
  100%
    transform: translateY(0px)
  
@keyframes pulse
  0%,100%
    transform: scale(1)
  50%
    transform: scale(1.3)
            
          
!
            
              $('.icon').on 'click', ->
   $('.dropdown').toggleClass('active')
   $('.dropdown-menu').toggleClass('hidden') 
            
          
!
999px
Loading ..................

Console