Skip to content
Snippets Groups Projects
circular-progress.scss 1.34 KiB
Newer Older

@use 'styles/settings.scss' as s;
@use 'styles/functions.scss' as fn;
    position: relative;
    justify-content: center;
    font-size: 14px;
    @each $key,
    $color in s.$themeLightMap {
        &.color-#{$key} {
            svg {
                path {
                    stroke: url('#gradient-#{$key}');
                }

                linearGradient#gradient-#{$key} {
                    stop {
                        &:last-child {
                            stop-color: $color !important;
                        }

                        &:first-child {
                            stop-color: fn.getFrom(s.$themeDarkMap, $key) !important;
                        }
                    }
                }
            }
        }
    }

    svg {
        width: 70px;
        height: 70px;

        path {
            stroke-width: 8;
            stroke-linecap: round;
            stroke: url(#gradient);
            fill: none;
        }

        circle {
            fill: none;
            stroke: s.$background;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        line-height: 1;
        font-weight: s.$weight-bold;
        display: flex;