Skip to content

Instantly share code, notes, and snippets.

@itwasmattgregg
Last active August 30, 2016 16:37
Show Gist options
  • Save itwasmattgregg/04af9ea88ef46168367d to your computer and use it in GitHub Desktop.
Save itwasmattgregg/04af9ea88ef46168367d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="progress-button loading">
<button></button>
<svg class="progress-circle" width="300" height="300">
<path d="M149.5,5C229.3,5,294,69.7,294,149.5S229.3,294,149.5,294S5,229.3,5,149.5S69.7,5,149.5,5z"></path>
</svg>
</div>
// ----
// libsass (v3.2.5)
// ----
.progress-button {
position: relative;
display: inline-block;
text-align: center;
min-width: 250px;
margin: 10px;
background-color: #eee;
button {
width: 300px;
height: 300px;
border: 2px solid #1ecd97;
border-width: 10px;
border-color: #fff;
border-radius: 50%;
display: block;
margin: 0 auto;
padding: 0;
background: transparent;
}
.progress-circle {
position: absolute;
background-color: transparent;
top: 0;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
pointer-events: none;
path {
stroke-dasharray: 908px;
stroke-dashoffset: 500px;
opacity: 1;
-webkit-transition: stroke-dashoffset 0.3s;
transition: stroke-dashoffset 0.3s;
stroke: #1ECD97;
stroke-width: 10;
fill: none;
}
}
}
.progress-button {
position: relative;
display: inline-block;
text-align: center;
min-width: 250px;
margin: 10px;
background-color: #eee;
}
.progress-button button {
width: 300px;
height: 300px;
border: 2px solid #1ecd97;
border-width: 10px;
border-color: #fff;
border-radius: 50%;
display: block;
margin: 0 auto;
padding: 0;
background: transparent;
}
.progress-button .progress-circle {
position: absolute;
background-color: transparent;
top: 0;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
pointer-events: none;
}
.progress-button .progress-circle path {
stroke-dasharray: 908px;
stroke-dashoffset: 500px;
opacity: 1;
-webkit-transition: stroke-dashoffset 0.3s;
transition: stroke-dashoffset 0.3s;
stroke: #1ECD97;
stroke-width: 10;
fill: none;
}
<div class="progress-button loading">
<button></button>
<svg class="progress-circle" width="300" height="300">
<path d="M149.5,5C229.3,5,294,69.7,294,149.5S229.3,294,149.5,294S5,229.3,5,149.5S69.7,5,149.5,5z"></path>
</svg>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment