First take note ot the sds-circularCompletion__progress element's r (radius) attribute, which is 55.
The way to calculate the progress amount for the circluar progress bar is as follows:
<!-- Default -->
<div class="sds-circularCompletion sds-logementColor">
<svg class="sds-circularCompletion__circleWrapper" viewBox="0 0 118 118" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" class="sds-circularCompletion__circle" r="55" cx="59" cy="59" stroke-dasharray="346"></circle>
<circle fill="none" class="sds-circularCompletion__circle sds-circularCompletion__progress" r="55" cx="59" cy="59" stroke-dasharray="259.5 346"></circle>
</svg>
<img class="sds-circularCompletion__img" src="../../media/snet/components/circular-completion/home.jpg" alt="img alt">
<div class="sds-circularCompletion__dropdown dropdown">
<button type="button" class="sds-btn -iconBtn -btnSecondary" data-reference="parent" data-boundary="window" data-toggle="dropdown">
<span class="sds-icon sds-icon-more"></span>
</button>
<div aria-labelledby="" class="sds-actionMenu dropdown-menu dropdown-menu-right">
<a href="" class="sds-actionMenu__item dropdown-item">
Item 1
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 2
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 3
</a>
</div>
</div>
</div>
<!-- Add Project -->
<div class="sds-circularCompletion -dashed">
<a class="sds-circularCompletion__link d-flex flex-column align-items-center justify-content-center" href="#!">
<span class="sds-iconCircle -primaryG -smaller" aria-hidden="true">
<span class="sds-icon sds-icon-plus"></span>
</span>
<span class="sds-circularCompletion__more sds-textHelper sds-textSemiBold">Nouveau Projet</span>
</a>
</div>
<!-- Services -->
<div class="sds-circularCompletion sds-servicesColor">
<svg class="sds-circularCompletion__circleWrapper" viewBox="0 0 118 118" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" class="sds-circularCompletion__circle" r="55" cx="59" cy="59" stroke-dasharray="346"></circle>
<circle fill="none" class="sds-circularCompletion__circle sds-circularCompletion__progress" r="55" cx="59" cy="59" stroke-dasharray="86.5 346"></circle>
</svg>
<img class="sds-circularCompletion__img" src="https:/design.spuerkeess.lu/media/illustrations/svg240x240/spot/sdsillu-constructiontoolsb.svg" alt="img alt">
<div class="sds-circularCompletion__dropdown dropdown">
<button type="button" class="sds-btn -iconBtn -btnSecondary" data-reference="parent" data-boundary="window" data-toggle="dropdown">
<span class="sds-icon sds-icon-more"></span>
</button>
<div aria-labelledby="" class="sds-actionMenu dropdown-menu dropdown-menu-right">
<a href="" class="sds-actionMenu__item dropdown-item">
Item 1
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 2
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 3
</a>
</div>
</div>
</div>
<!-- Services Complete -->
<div class="sds-circularCompletion sds-mobiliteColor">
<svg class="sds-circularCompletion__circleWrapper" viewBox="0 0 118 118" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" class="sds-circularCompletion__circle" r="55" cx="59" cy="59" stroke-dasharray="346"></circle>
<circle fill="none" class="sds-circularCompletion__circle sds-circularCompletion__progress" r="55" cx="59" cy="59" stroke-dasharray="346 346"></circle>
</svg>
<img class="sds-circularCompletion__img" src="https:/design.spuerkeess.lu/media/illustrations/svg240x240/spot/sdsillu-electriccarb.svg" alt="img alt">
<span class="sds-iconCircle -success100 -small sds-circularCompletion__complete" aria-hidden="true">
<span class="sds-icon sds-icon-check"></span>
<span class="sr-only">Project Complete</span>
</span>
<div class="sds-circularCompletion__dropdown dropdown">
<button type="button" class="sds-btn -iconBtn -btnSecondary" data-reference="parent" data-boundary="window" data-toggle="dropdown">
<span class="sds-icon sds-icon-more"></span>
</button>
<div aria-labelledby="" class="sds-actionMenu dropdown-menu dropdown-menu-right">
<a href="" class="sds-actionMenu__item dropdown-item">
Item 1
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 2
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 3
</a>
</div>
</div>
</div>
<!-- Loisirs Complete -->
<div class="sds-circularCompletion sds-loisirsColor">
<svg class="sds-circularCompletion__circleWrapper" viewBox="0 0 118 118" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" class="sds-circularCompletion__circle" r="55" cx="59" cy="59" stroke-dasharray="346"></circle>
<circle fill="none" class="sds-circularCompletion__circle sds-circularCompletion__progress" r="55" cx="59" cy="59" stroke-dasharray="346 346"></circle>
</svg>
<img class="sds-circularCompletion__img" src="../../media/snet/components/circular-completion/holidays.jpg" alt="img alt">
<span class="sds-iconCircle -success100 -small sds-circularCompletion__complete" aria-hidden="true">
<span class="sds-icon sds-icon-check"></span>
<span class="sr-only">Project Complete</span>
</span>
<div class="sds-circularCompletion__dropdown dropdown">
<button type="button" class="sds-btn -iconBtn -btnSecondary" data-reference="parent" data-boundary="window" data-toggle="dropdown">
<span class="sds-icon sds-icon-more"></span>
</button>
<div aria-labelledby="" class="sds-actionMenu dropdown-menu dropdown-menu-right">
<a href="" class="sds-actionMenu__item dropdown-item">
Item 1
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 2
</a>
<a href="" class="sds-actionMenu__item dropdown-item">
Item 3
</a>
</div>
</div>
</div>
<div class="{{ namespace }}circularCompletion{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
{% if addProject %}
<a class="{{ namespace }}circularCompletion__link d-flex flex-column align-items-center justify-content-center" href="#!">
{% render "@icon-circle-regular--primary-gradient-small" %}
<span class="{{ namespace }}circularCompletion__more {{ namespace }}textHelper {{ namespace }}textSemiBold">Nouveau Projet</span>
</a>
{% else %}
<svg class="{{ namespace }}circularCompletion__circleWrapper" viewBox="0 0 118 118" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" class="{{ namespace }}circularCompletion__circle" r="55" cx="59" cy="59" stroke-dasharray="346"></circle>
<circle fill="none" class="{{ namespace }}circularCompletion__circle {{ namespace }}circularCompletion__progress" r="55" cx="59" cy="59" stroke-dasharray="{{ (346 * progress) / 100 }} 346"></circle>
</svg>
{% if externalImage %}
<img class="{{ namespace }}circularCompletion__img" src="{{ img }}" alt="img alt">
{% else %}
<img class="{{ namespace }}circularCompletion__img" src="{{ (mediaPath+img) | path }}" alt="img alt">
{% endif %}
{% if complete %}
{% render "@icon-circle-regular--success-100-small",{
icon: "icon-check",
classes: [namespace + "circularCompletion__complete"],
helperText: "Project Complete"
},true %}
{% endif %}
{% endif %}
{% if dropdown %}
<div class="{{ namespace }}circularCompletion__dropdown dropdown">
{% render "@icon-btn-secondary",{
icon: "icon-more",
attrs: {
"data-reference": "parent",
"data-boundary": "window",
"data-toggle": "dropdown"
}
},true %}
{% render "@snet-action-menu",{
classes: ["dropdown-menu-right"]
},true %}
</div>
{% endif %}
</div>
/* variables specific to current element */
$circular-completion-dimensions: 112px;
$circular-completion-border-radius: map-deep-get($token-radius-map, "circle");
.#{$namespace}circularCompletion {
/* Save root element context for easy access if nesting is needed */
$self: &;
/* properties of current element + media queries */
position: relative;
width: $circular-completion-dimensions;
height: $circular-completion-dimensions;
border-radius: $circular-completion-border-radius;
display: flex;
/* Pseudo Elements */
&::before {
}
&::after {
}
/*
Include elements that are linked to the current element but have to reside at the root level of the stylesheet
(e.g: keyframes)
*/
@at-root {
}
/* children - write selector in full in comments in order to facilitate search */
// circularCompletion__circle
&__circle {
// follows same logic as parent
@include custom-prop-fallback("stroke", "sys-color-border-primary-subtle");
stroke-width: $border-width * 2;
transform-origin: center center;
}
&__inner,
&__circleWrapper {
width: 100%;
height: 100%;
}
&__progress {
transform: rotate(-90deg);
stroke: currentColor;
}
&__more {
@include custom-prop-fallback("color", "sys-color-text-secondary-vivid");
margin-top: map-deep-get($token-spacer-unit-map, "4");
padding: 0 map-deep-get($token-spacer-unit-map, "16");
text-align: center;
}
&__img {
width: 80px;
height: 80px;
border-radius: $circular-completion-border-radius;
object-fit: cover;
}
&__complete {
@include custom-prop-fallback("color", "sys-color-background-accent-100");
}
&__inner,
&__circleWrapper,
&__img,
&__complete {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
&__dropdown {
align-self: flex-start;
margin-left: auto;
z-index: z("medium"); // z-index works on position: static here because of the flex context DO NOT REMOVE
@media (hover: hover) {
opacity: 0;
}
}
&__link {
border-radius: $circular-completion-border-radius;
&::after {
content: "";
position: absolute;
top: $border-width*2;
right: $border-width*2;
bottom: $border-width*2;
left: $border-width*2;
border: $border-width*2 dashed;
@include custom-prop-fallback("border-color", "sys-color-border-primary-moderate");
border-radius: $circular-completion-border-radius;
}
}
/* modifiers */
// circularCompletion -altStyle
&.altStyle {
// follows same logic as base element
}
/* random parent element */
/*
*
* Syntax : .randomParentElt & {}
*
*/
/* Pseudo Classes */
&:hover {
@media (hover: hover) {
#{$self}__dropdown {
opacity: 1;
}
#{$self}__link {
&::after {
@include custom-prop-fallback("border-color", "sys-color-text-secondary-vivid");
}
}
}
}
&:focus {
}
&:active {
}
&:focus,
&:active {
}
}