Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d20e9e4

Browse files
authored
Fix gradients spacings on the space panel (#12262)
* Fix gradients spacings on the space panel Make the gradients two separate ones so they can be fixed pixel widths from the top & bottom rather than percentages of the height. Tweak the spacings between the user menu & threads panel to match the figma and from Gaelle's design. * Update snapshots * More screenshots
1 parent a9add45 commit d20e9e4

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed
-232 Bytes
Loading
30 Bytes
Loading
-8 Bytes
Loading

res/css/structures/_SpacePanel.pcss

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,20 +338,47 @@ limitations under the License.
338338
}
339339

340340
&.mx_IndicatorScrollbar_topOverflow {
341-
mask-image: linear-gradient(180deg, transparent, black 5%);
341+
mask-image: linear-gradient(to bottom, transparent, black 16px);
342342
}
343343

344344
&.mx_IndicatorScrollbar_bottomOverflow {
345-
mask-image: linear-gradient(180deg, black, black 95%, transparent);
345+
mask-image: linear-gradient(
346+
to top,
347+
transparent,
348+
rgba(255, 255, 255, 30%) 4px,
349+
rgba(255, 255, 255, 55%) 8px,
350+
rgba(255, 255, 255, 75%) 12px,
351+
black 16px
352+
);
346353
}
347354

348355
&.mx_IndicatorScrollbar_topOverflow.mx_IndicatorScrollbar_bottomOverflow {
349-
mask-image: linear-gradient(180deg, transparent, black 5%, black 95%, transparent);
356+
/* This stacks two gradients on top of one another, which lets us
357+
have a fixed pixel offset from both top and bottom for the colour stops.
358+
Note the top fade is much smaller because the spaces start close to the top,
359+
so otherwise a large gradient suddenly appears when you scroll down.
360+
*/
361+
mask-image: linear-gradient(to bottom, transparent, black 16px),
362+
linear-gradient(
363+
to top,
364+
transparent,
365+
rgba(255, 255, 255, 30%) 4px,
366+
rgba(255, 255, 255, 55%) 8px,
367+
rgba(255, 255, 255, 75%) 12px,
368+
black 16px
369+
);
370+
mask-position:
371+
0% 0%,
372+
0% 100%;
373+
mask-size:
374+
calc(100% - 10px) 50%,
375+
calc(100% - 10px) 50%;
376+
mask-repeat: no-repeat;
350377
}
351378
}
352379

353380
.mx_UserMenu {
354-
padding: 0 2px 8px;
381+
padding-bottom: 12px;
355382
border-bottom: 1px solid $separator;
356383
margin: 12px 14px 4px 18px;
357384
max-width: 226px;

res/css/structures/_ThreadsActivityCentre.pcss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
align-items: center;
2525
justify-content: center;
2626
border-radius: 8px;
27-
margin: auto;
27+
margin: 18px auto auto auto;
2828

2929
&.expanded {
3030
/* align with settings icon */

0 commit comments

Comments
 (0)