Skip to content

Commit

Permalink
Fix icon clipping on calling header buttons
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
  • Loading branch information
automated-signal and EvanHahn-Signal committed Aug 24, 2021
1 parent 45dd4dc commit f2f5523
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
5 changes: 4 additions & 1 deletion stylesheets/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@

// Icons

@mixin color-svg($svg, $color, $stretch: true) {
@mixin color-svg($svg, $color, $stretch: true, $mask-origin: null) {
-webkit-mask: url($svg) no-repeat center;
@if $stretch {
-webkit-mask-size: 100%;
}
@if $mask-origin {
-webkit-mask-origin: $mask-origin;
}
background-color: $color;
}

Expand Down
39 changes: 11 additions & 28 deletions stylesheets/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5301,13 +5301,15 @@ button.module-image__border-overlay:focus {
}

.module-calling-button {
$size: 22px;
@mixin icon($path) {
@include color-svg($path, $color-white, $mask-origin: padding-box);
height: 24px;
width: 24px;
}

&__participants {
@include color-svg('../images/icons/v2/group-solid-24.svg', $color-white);
@include icon('../images/icons/v2/group-solid-24.svg');
display: inline-block;
height: $size;
width: $size;

&--container {
@include button-reset;
Expand All @@ -5332,42 +5334,23 @@ button.module-image__border-overlay:focus {
}

&__settings {
@include color-svg(
'../images/icons/v2/settings-solid-16.svg',
$color-white
);
height: $size;
width: $size;
@include icon('../images/icons/v2/settings-solid-16.svg');
}

&__grid-view {
@include color-svg(
'../images/icons/v2/grid-view-solid-24.svg',
$color-white
);
height: $size;
width: $size;
@include icon('../images/icons/v2/grid-view-solid-24.svg');
}

&__speaker-view {
@include color-svg(
'../images/icons/v2/speaker-view-solid-24.svg',
$color-white
);
height: $size;
width: $size;
@include icon('../images/icons/v2/speaker-view-solid-24.svg');
}

&__pip {
@include color-svg('../images/icons/v2/pip-minimize-24.svg', $color-white);
height: $size;
width: $size;
@include icon('../images/icons/v2/pip-minimize-24.svg');
}

&__cancel {
@include color-svg('../images/icons/v2/x-24.svg', $color-white);
height: $size;
width: $size;
@include icon('../images/icons/v2/x-24.svg');
}
}

Expand Down

0 comments on commit f2f5523

Please sign in to comment.