css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .container
  .page-header
    h1 Pure CSS - Progress Circles  
    p This is a example of progress circles using only Stylus. 

  .progress-circle(data-progress='10')
  .progress-circle(data-progress='25')
  .progress-circle(data-progress='50')
  .progress-circle(data-progress='75')
  .progress-circle(data-progress='100')
            
          
!
            
              //
// Progress Circle
//
// ==================================================
 
$theme-color = #0083ff
$back-color  = #dddddd

.progress-circle
  $size = 15rem
  background-color $back-color
  border-radius 50%
  display inline-block
  height $size
  margin 4rem 2rem 0
  position relative
  width $size

  &:before 
    align-items center
    background-color #fff
    border-radius 50%
    content attr(data-progress)'%'
    display flex
    font-size 3rem
    justify-content center
    position absolute 
    left 1rem
    right 1rem
    top  1rem
    bottom 1rem
    transition transform .2s ease

  &:after
    background-color $theme-color
    border-radius 50%
    content ''
    display inline-block
    height 100%
    width 100%

  &:hover
  &:focus
    &:before
      transform scale(.8)



/**
* $step is set to 5 by default, meaning you can only use percentage classes in increments of five (e.g. 25, 30, 45, 50, and so on). This helps to reduce the size of the final CSS file. If you need a number that doesn't end in 0 or 5, you can change the text percentage while rounding the class up/down to the nearest 5.
*/

$step      = 1
$loops     = round(100 / $step)
$increment = 360 / $loops
$half      = round($loops / 2)

for $i in (0)..($loops)
  .progress-circle[data-progress={'"'+$i * $step+'"'}]:after
    if $i < $half
      $next-deg = 90deg + $increment * $i
      background-image linear-gradient(90deg, $back-color 50%, transparent 50%, transparent), linear-gradient($next-deg, $theme-color 50%, $back-color 50%, $back-color)
    else
      $next-deg = -90deg + $increment * ($i - $half)
      background-image linear-gradient($next-deg, $theme-color 50%, transparent 50%, transparent), linear-gradient(270deg, $theme-color 50%, $back-color 50%, $back-color)

            
          
!
            
              /* Original: https://codepen.io/geedmo/pen/InFfd */
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console