Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d09c81b

Browse files
committedMar 4, 2025·
Add scroll hint to modal (copies Mirador implementation)
1 parent efd9d3f commit d09c81b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎app/assets/stylesheets/companion_window.css

+16
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,22 @@ body {
127127
max-height: 35vh;
128128
overflow-y: auto;
129129
padding: 0 2rem;
130+
131+
/* Scroll hint borrowed from Mirador */
132+
/* https://github.com/ProjectMirador/mirador/blob/5b8f60b4d0c923979c2ece2c4bbc07a0110b3638/src/components/ScrollIndicatedDialogContent.jsx#L29 */
133+
background:
134+
linear-gradient(rgb(255,255,255) 30%, rgba(255, 255, 255, 0)),
135+
linear-gradient(rgba(255, 255, 255, 0), rgb(255,255,255) 70%) 0 100%,
136+
radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)),
137+
radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%;
138+
background-attachment: local, local, scroll, scroll;
139+
background-repeat: no-repeat;
140+
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
141+
142+
textarea, input {
143+
/* Needed to allow the scroll hint to appear through the textarea and input */
144+
background: none;
145+
}
130146

131147
svg {
132148
vertical-align: middle;

0 commit comments

Comments
 (0)
Please sign in to comment.