signal-desktop/stylesheets/_mixins.scss

46 lines
829 B
SCSS

@mixin button-reset {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
}
@mixin color-svg($svg, $color, $stretch: true) {
-webkit-mask: url($svg) no-repeat center;
@if $stretch {
-webkit-mask-size: 100%;
}
background-color: $color;
}
@mixin header-icon-white($svg) {
@include color-svg($svg, rgba(255, 255, 255, 0.8));
&:focus,
&:hover {
@include color-svg($svg, white);
}
}
@mixin header-icon-black($svg) {
@include color-svg($svg, rgba(0, 0, 0, 0.5));
&:focus,
&:hover {
@include color-svg($svg, black);
}
}
@mixin light-theme() {
@content;
}
@mixin dark-theme() {
.dark-theme & {
@content;
}
}
@mixin popper-shadow() {
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 20px 0 rgba(0, 0, 0, 0.33);
}