Path: blob/main/src/vs/base/browser/ui/progressbar/progressbar.css
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45.monaco-progress-container {6width: 100%;7height: 2px;8overflow: hidden; /* keep progress bit in bounds */9}1011.monaco-progress-container .progress-bit {12width: 2%;13height: 2px;14position: absolute;15left: 0;16display: none;17}1819.monaco-progress-container.active .progress-bit {20display: inherit;21}2223.monaco-progress-container.discrete .progress-bit {24left: 0;25transition: width 100ms linear;26}2728.monaco-progress-container.discrete.done .progress-bit {29width: 100%;30}3132.monaco-progress-container.infinite .progress-bit {33animation-name: progress;34animation-duration: 4s;35animation-iteration-count: infinite;36transform: translate3d(0px, 0px, 0px);37animation-timing-function: linear;38}3940.monaco-progress-container.infinite.infinite-long-running .progress-bit {41/*42The more smooth `linear` timing function can cause43higher GPU consumption as indicated in44https://github.com/microsoft/vscode/issues/97900 &45https://github.com/microsoft/vscode/issues/13839646*/47animation-timing-function: steps(100);48}4950/**51* The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of52* that container. Since translateX is relative to the progress bit size, we have to multiple it with53* its relative size to the parent container:54* parent width: 5000%55* bit width: 100%56* translateX should be as follow:57* 50%: 5000% * 50% - 50% (set to center) = 2450%58* 100%: 5000% * 100% - 100% (do not overflow) = 4900%59*/60@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }616263