signal-desktop/stylesheets/components/ContactPill.scss

92 lines
1.9 KiB
SCSS
Raw Normal View History

2021-03-03 20:09:58 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2024-11-15 23:09:31 +00:00
@use '../mixins';
@use '../variables';
2021-03-03 20:09:58 +00:00
.module-ContactPill {
align-items: center;
display: inline-flex;
user-select: none;
overflow: hidden;
2023-05-04 18:04:22 +00:00
padding-block: 4px;
padding-inline: 8px;
border-radius: 6px;
2021-03-03 20:09:58 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-black-alpha-08;
color: variables.$color-gray-90;
2021-03-03 20:09:58 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-white-alpha-12;
color: variables.$color-gray-05;
2023-05-04 23:46:34 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
2023-05-04 23:46:34 +00:00
&:focus-within {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-gray-45;
color: variables.$color-white;
2023-05-04 23:46:34 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-25;
color: variables.$color-gray-90;
2023-05-04 23:46:34 +00:00
}
}
2021-03-03 20:09:58 +00:00
}
&__contact-name {
2024-11-15 23:09:31 +00:00
@include mixins.font-body-2;
2023-04-20 17:03:43 +00:00
padding-block: 0;
padding-inline: 6px;
2021-03-03 20:09:58 +00:00
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&__remove {
2023-05-04 18:04:22 +00:00
$icon: '../images/icons/v3/x/x-compact-light.svg';
2021-03-03 20:09:58 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.button-reset;
& {
height: 100%;
display: flex;
width: 16px;
height: 16px;
justify-content: center;
align-items: center;
padding: 0;
}
2021-03-03 20:09:58 +00:00
&::before {
content: '';
2023-05-04 18:04:22 +00:00
width: 100%;
height: 100%;
2021-03-03 20:09:58 +00:00
display: block;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
@include mixins.color-svg($icon, variables.$color-gray-60);
2021-03-03 20:09:58 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
@include mixins.color-svg($icon, variables.$color-gray-25);
2021-03-03 20:09:58 +00:00
}
}
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
2021-03-03 20:09:58 +00:00
&:focus {
&::before {
2024-11-15 23:09:31 +00:00
@include mixins.color-svg($icon, variables.$color-white);
2021-03-03 20:09:58 +00:00
}
}
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-keyboard-mode {
2021-03-03 20:09:58 +00:00
&:focus {
&::before {
2024-11-15 23:09:31 +00:00
@include mixins.color-svg($icon, variables.$color-gray-90);
2021-03-03 20:09:58 +00:00
}
}
}
}
}