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

Commit

Permalink
Replace a Sass variable with a CSS custom property - hover-transition (
Browse files Browse the repository at this point in the history
  • Loading branch information
luixxiul committed May 22, 2023
1 parent 74d3018 commit 2e3cb0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions res/css/_animations.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ limitations under the License.
transition: opacity 300ms ease;
}

:root {
--hover-transition: 0.08s cubic-bezier(0.46, 0.03, 0.52, 0.96); /* quadratic */
}

@keyframes mx--anim-pulse {
0% {
opacity: 1;
Expand Down
2 changes: 0 additions & 2 deletions res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ limitations under the License.
@import "./_spacing.pcss";
@import url("maplibre-gl/dist/maplibre-gl.css");

$hover-transition: 0.08s cubic-bezier(0.46, 0.03, 0.52, 0.96); /* quadratic */

:root {
font-size: 10px;

Expand Down
2 changes: 1 addition & 1 deletion res/css/views/settings/_AvatarSetting.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
position: relative;

.mx_AvatarSetting_hover {
transition: opacity $hover-transition;
transition: opacity var(--hover-transition);

/* position to place the hover bg over the entire thing */
position: absolute;
Expand Down

0 comments on commit 2e3cb0a

Please sign in to comment.