Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions README.md

Large diffs are not rendered by default.

193 changes: 193 additions & 0 deletions guides/ui-components/progress-ring/demo.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions guides/ui-components/progress-ring/expectations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Expectations
Comment thread
LeaVerou marked this conversation as resolved.

- The component contains a native HTML `<progress>` element.
- The component is visible on the page.
- The visual progress ring is implemented using a CSS `conic-gradient`.
- The center of the progress ring is transparent or "hollowed out" using `background-clip: border-area`.
- If `background-clip: border-area` is not supported, fall back to hollowing out the center of the ring with a radial gradient mask.
- The `value` attribute on `<progress>` is used to drive the visual progress of the ring using `attr()`.
- If using `attr()` on non-content properties is not supported, fallback to update the visual ring with JavaScript via the `--value` property.
- The component supports displaying text content (e.g., the percentage) in the center of the ring.
- The ring smoothly transitions between values when the `--value` property is updated (requiring `@property` support in the browser).
- The `<progress>` element includes an `aria-label` for accessibility.
- The component's fill color changes to a success color (e.g., green) when the progress value reaches 100%.
- The component has a distinct visual "track" (background) behind the progress fill.
- The spinner respects `prefers-reduced-motion` by changing to a new value immediately, rather than having a smooth transition.
Loading
Loading