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.

Quick-add: + add another resource

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.

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.

  - phrases = ["Hello!", "你好", "¡Hola!", "もしもし", "Привет!"]
  - phrases.each do |phrase|
      .conversation__participant__bubble= phrase

              // Frameworks and Mixins
// ---------------------------
@import bourbon
=block($w, $h)
  display: block
  width: $w
  height: $h
=font($s, $lh)
  font-size: $s + 'px'
  line-height: $lh + 'px'

// Animations for Bubbles
// ---------------------------
$object_count: 5
$object_order: 3 4 1 2 5
$duration: 3s
$animation_steps: 5

$frame_count: $animation_steps * $object_count
$frame_length:  100 / $frame_count
$animation_length: $duration * $object_count

@for $i from 1 through $object_count
      +animation(bubble_#{$i} $animation_length $ease-in-out-back)
  Iterates over a timeline, stepping up the
  animation window by 6 frames each increment.
  This accounts for the delay between animations
  and allows all bubble aniamtions to exist on
  the same theoretical timeline
@for $i from 1 through $object_count
    $on_object: nth($object_order, $i)
    $start_percent: (($on_object - 1)/$object_count) * 100
//  This isnt really the important stuff here, just the positioning and the polish. :)
// --------------------------
  background: url("http://williamanderson.io/remote_use/patterns/bg.png")

// Icon List feature
// --------------------------

// Loval Vars
$icon_size: 90px
$bubble_size: 90px
$bubble_height: 16px * 3
$triangle_size: 12px

$darkGrey: #757575
$bor_rad: 5px

$participant_colors: #d65b5b #8dc63f #fbb040 #27aae1 #ec008c

  text-align: center
  margin: 130px auto 50px auto

  +block($icon_size, $icon_size)
  display: inline-block
  margin: 0px 15px
  position: relative
  +block($icon_size*0.6, $icon_size*0.6)
  border-radius: $icon_size*0.3
  margin: $icon_size*0.2
  background: black
@for $i from 1 through 5
      background: nth($participant_colors, $i)

  box-sizing: content-box
  +block($bubble_size, auto)
  min-height: 16px
  position: absolute
  top: $icon_size
  left: ($bubble_size - $icon_size ) * -0.5 - 14
  padding: 1em
  +font(14, 19)
  font-family: arial, helvetica, sans-serif
  letter-spacing: 1px
  color: white
  background: $darkGrey
  border-radius: $bor_rad
  +transform-origin(center top)

    content: ""
    +triangle($triangle_size, $darkGrey, up)
    position: absolute
    top: $triangle_size * -0.5
    left: 50%
    margin-left: $triangle_size * -0.5

// adjustments for alternating bubbles
    top: auto
    bottom: $icon_size
    +transform-origin(center bottom)
      border: 0px
      +triangle($triangle_size, $darkGrey, down)
      top: auto
      bottom: $triangle_size * -0.5

You can learn more about this @
Loading ..................