:root { --progress-bar-height: 6px; --progress-bar-width: 87%; --progress-bar-radius: 3px; } .progress-bar { display: flex; align-items: center; justify-content: space-between; } .progress-bar div.progress-bar__base { background-color: #bbb; width: 100%; height: var(--progress-bar-height); width: var(--progress-bar-width); border-radius: var(--progress-bar-radius); } .progress-bar div.progress-bar__progress { background-color: var(--dark-grey); width: 68%; /* this can be controlled with javascript to set percent loaded */ height: var(--progress-bar-height); border-radius: var(--progress-bar-radius); } .progress-bar div.progress-bar__percentage { font-size: var(--font-size-14); font-weight: bold; color: var(--light-grey); }