Run the comment progress around the border of the box
Two lines start at opposite corners (top left along the top, bottom right along the bottom) and meet when the next comment is due. Drawn as an SVG outline with pathLength 100 and a dash pattern repeating every half perimeter, so it follows the rounded corners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
12b10121ec
commit
7a378a0bc5
3 files changed
+31
-12
No files matched your search
@@ -593,13 +593,18 @@ button.qa-steps__step:hover:not(:disabled) { color: var(--text); border-color: v
|
||||
/* at most about 5 lines; longer comments are set smaller by Comments.fit() instead of being cut off */
|
||||
.comments { --comment-size: 1.25em; --comment-max: 9.5em; }
|
||||
.comments__sizer, .comments__current { max-height: var(--comment-max); overflow: hidden; }
|
||||
/* progress until the next comment: the bottom edge of the box, takes no room of its own */
|
||||
.comments__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--border); }
|
||||
.comments__progress[hidden] { display: block; visibility: hidden; } /* paused: the edge stays plain */
|
||||
.comments__progress-fill { height: 100%; background: var(--primary); transform: scaleX(0); transform-origin: left; }
|
||||
/* progress until the next comment: the border of the box, two lines from opposite corners
|
||||
(pathLength 100, dash pattern repeating every half perimeter) that meet when the time is up */
|
||||
.comments__progress { position: absolute; inset: 0; pointer-events: none; }
|
||||
.comments__progress[hidden] { display: block; visibility: hidden; } /* paused: no border */
|
||||
.comments__progress svg { display: block; width: 100%; height: 100%; }
|
||||
.comments__progress-fill {
|
||||
x: 2px; y: 2px; width: calc(100% - 4px); height: calc(100% - 4px); rx: 12px;
|
||||
fill: none; stroke: var(--primary); stroke-width: 4px; stroke-dasharray: 0 50;
|
||||
}
|
||||
@keyframes comment-progress {
|
||||
from { transform: scaleX(0); }
|
||||
to { transform: scaleX(1); }
|
||||
from { stroke-dasharray: 0 50; }
|
||||
to { stroke-dasharray: 50 0; }
|
||||
}
|
||||
.comments__nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
|
||||
.comments__button { min-width: 44px; min-height: 44px; }
|
||||
|
||||
Reference in new issue
Block a user