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

              
                svg.tea(width='37' height='48' viewbox='0 0 37 48' fill='none' xmlns='http://www.w3.org/2000/svg')
  path(d='M27.0819 17H3.02508C1.91076 17 1.01376 17.9059 1.0485 19.0197C1.15761 22.5177 1.49703 29.7374 2.5 34C4.07125 40.6778 7.18553 44.8868 8.44856 46.3845C8.79051 46.79 9.29799 47 9.82843 47H20.0218C20.639 47 21.2193 46.7159 21.5659 46.2052C22.6765 44.5687 25.2312 40.4282 27.5 34C28.9757 29.8188 29.084 22.4043 29.0441 18.9156C29.0319 17.8436 28.1539 17 27.0819 17Z' stroke='var(--secondary)' stroke-width='2')
  path(d='M29 23.5C29 23.5 34.5 20.5 35.5 25.4999C36.0986 28.4926 34.2033 31.5383 32 32.8713C29.4555 34.4108 28 34 28 34' stroke='var(--secondary)' stroke-width='2')
  path#teabag(fill='var(--secondary)' fill-rule='evenodd' clip-rule='evenodd' d='M16 25V17H14V25H12C10.3431 25 9 26.3431 9 28V34C9 35.6569 10.3431 37 12 37H18C19.6569 37 21 35.6569 21 34V28C21 26.3431 19.6569 25 18 25H16ZM11 28C11 27.4477 11.4477 27 12 27H18C18.5523 27 19 27.4477 19 28V34C19 34.5523 18.5523 35 18 35H12C11.4477 35 11 34.5523 11 34V28Z')
  path#steamL(d='M17 1C17 1 17 4.5 14 6.5C11 8.5 11 12 11 12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' stroke='var(--secondary)')
  path#steamR(d='M21 6C21 6 21 8.22727 19 9.5C17 10.7727 17 13 17 13' stroke='var(--secondary)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round')

              
            
!

CSS

              
                body
  min-height: 100vh
  display: grid
  place-items: center

svg.tea
  --secondary: #33406F
  //transform: scale(2)

  #teabag
    transform-origin: top center
    transform: rotate(3deg)
    animation: swing 2s infinite

  #steamL
    stroke-dasharray: 13
    stroke-dashoffset: 13
    animation: steamLarge 2s infinite

  #steamR
    stroke-dasharray: 9
    stroke-dashoffset: 9
    animation: steamSmall 2s infinite

@keyframes swing
  50%
    transform: rotate(-3deg)

@keyframes steamLarge
  0%
    stroke-dashoffset: 13
    opacity: .6
  100%
    stroke-dashoffset: 39
    opacity: 0

@keyframes steamSmall
  10%
    stroke-dashoffset: 9
    opacity: .6
  80%
    stroke-dashoffset: 27
    opacity: 0
  100%
    stroke-dashoffset: 27
    opacity: 0

              
            
!

JS

              
                //Inspiration https://icons8.com/animated-icons/tea
              
            
!
999px

Console