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.

              @import compass

=speech-bubble($arrow-direction: bottom, $arrow-pos: 50%, $height: 60px, $width: 60px, $padding: 0, $arrow-width: 12px, $arrow-length: 12px, $color: #aaa, $bgcolor: #333, $border-radius: 4px, $content: '', $bg-img: '', $bg-size: auto, $stab: 8px, $positioned: false, $size: 'medium')

  $arrow-v: ''
  $arrow-h: ''
  $offset-direction: ''
  $offset-body: ''

  @if $arrow-direction == left or $arrow-direction == right
    $arrow-v: transparent
    $arrow-h: $bgcolor
    $offset-direction: top
    $offset-body: $height / 2
    $arrow-v: $bgcolor
    $arrow-h: transparent
    $offset-direction: left
    $offset-body: $width / 2

    position: relative

  &::before, &::after
    position: absolute
    content: $content
    #{opposite-position($arrow-direction)}: $stab - $height - $arrow-length
    #{$offset-direction}: 50%
    margin-#{$offset-direction}: -$offset-body
    width: $width
    height: $height
    line-height: $height
    padding: $padding
    color: $color
    background: if($bg-img != "", $bgcolor $bg-img, $bgcolor)
    background-position: center center
    background-size: $bg-size
    background-repeat: no-repeat
    border-radius: $border-radius
    text-align: center
    font-size: $size
    content: ''
    #{opposite-position($arrow-direction)}: $stab - $arrow-length
    #{$offset-direction}: 50%
    margin-#{$offset-direction}: - $arrow-width
    border-style: solid
    border-width: $arrow-length $arrow-width
    border-#{$arrow-direction}-width: 0
    border-color: $arrow-v $arrow-h
    display: block
  position: absolute
  top: 50%
  left: 50%
  margin: -45px
  height: 90px
  width: 90px
  background: blue
  border-radius: 12px
  +speech-bubble($content: '☻', $positioned: true, $color: yellow, $size: 36px, $bgcolor: #ff8800)
Loading ..................