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

Commit

Permalink
Fix gradients spacings on the space panel (#12262)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dbkr authored Feb 20, 2024
1 parent a9add45 commit d20e9e4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 31 additions & 4 deletions res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -338,20 +338,47 @@ limitations under the License.
}

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

&.mx_IndicatorScrollbar_bottomOverflow {
mask-image: linear-gradient(180deg, black, black 95%, transparent);
mask-image: linear-gradient(
to top,
transparent,
rgba(255, 255, 255, 30%) 4px,
rgba(255, 255, 255, 55%) 8px,
rgba(255, 255, 255, 75%) 12px,
black 16px
);
}

&.mx_IndicatorScrollbar_topOverflow.mx_IndicatorScrollbar_bottomOverflow {
mask-image: linear-gradient(180deg, transparent, black 5%, black 95%, transparent);
/* This stacks two gradients on top of one another, which lets us
have a fixed pixel offset from both top and bottom for the colour stops.
Note the top fade is much smaller because the spaces start close to the top,
so otherwise a large gradient suddenly appears when you scroll down.
*/
mask-image: linear-gradient(to bottom, transparent, black 16px),
linear-gradient(
to top,
transparent,
rgba(255, 255, 255, 30%) 4px,
rgba(255, 255, 255, 55%) 8px,
rgba(255, 255, 255, 75%) 12px,
black 16px
);
mask-position:
0% 0%,
0% 100%;
mask-size:
calc(100% - 10px) 50%,
calc(100% - 10px) 50%;
mask-repeat: no-repeat;
}
}

.mx_UserMenu {
padding: 0 2px 8px;
padding-bottom: 12px;
border-bottom: 1px solid $separator;
margin: 12px 14px 4px 18px;
max-width: 226px;
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_ThreadsActivityCentre.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
align-items: center;
justify-content: center;
border-radius: 8px;
margin: auto;
margin: 18px auto auto auto;

&.expanded {
/* align with settings icon */
Expand Down

0 comments on commit d20e9e4

Please sign in to comment.