Skip to content

Commit 6c47130

Browse files
aramos-adobecastastrophe
authored andcommitted
feat(progresscircle): adding border for determinate version
1 parent e1afb5c commit 6c47130

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

components/progresscircle/index.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,29 @@ governing permissions and limitations under the License.
3737
--spectrum-progress-circle-thickness: var(--spectrum-progress-circle-thickness-large);
3838
}
3939

40+
.spectrum-Circle {
41+
fill: none;
42+
}
43+
4044
/* windows high contrast mode */
4145
@media (forced-colors: active) {
4246
.spectrum-ProgressCircle {
4347
/* fill is bright color */
4448
--highcontrast-progress-circle-fill-border-color: Highlight;
4549
--highcontrast-progressbar-track-color: Canvas;
4650
}
51+
52+
.spectrum-ProgressCircle:not(.spectrum-ProgressCircle--indeterminate) {
53+
.spectrum-Circle {
54+
stroke: CanvasText;
55+
}
56+
57+
.spectrum-outerCircle {
58+
border: 1px solid;
59+
border-color: CanvasText;
60+
border-radius: 50%;
61+
}
62+
}
4763
}
4864

4965
.spectrum-ProgressCircle {

components/progresscircle/stories/template.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export const Template = ({
2525
// SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.
2626
let radius = `calc(50% - ${strokeWidth / 2}px)`;
2727

28+
let insideRadius = `calc(50% - ${strokeWidth / 1}px)`;
29+
2830
return html`
2931
<div
3032
class=${classMap({
@@ -38,7 +40,8 @@ export const Template = ({
3840
style=${styleMap(customStyles)}
3941
data-testid=${ifDefined(testId)}
4042
>
41-
<svg fill="none" width="100%" height="100%">
43+
<svg fill="none" width="100%" height="100%" class="spectrum-outerCircle">
44+
<circle class="spectrum-Circle" cx="50%" cy="50%" r=${insideRadius} stroke-width="2" />
4245
<circle
4346
cx="50%"
4447
cy="50%"

0 commit comments

Comments
 (0)