signal-desktop/stylesheets/components/Preferences.scss

316 lines
5.9 KiB
SCSS
Raw Normal View History

2021-08-18 20:08:14 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
@mixin preferences-icon($light_svg, $dark_svg) {
2021-08-23 23:14:53 +00:00
&::before {
2021-08-18 20:08:14 +00:00
@include light-theme {
@include color-svg($light_svg, $color-gray-75);
}
@include dark-theme {
@include color-svg($dark_svg, $color-gray-15);
}
}
}
.Preferences {
display: flex;
overflow: hidden;
2023-02-23 21:32:19 +00:00
user-select: none;
2021-08-18 20:08:14 +00:00
@include light-theme {
background: $color-white;
}
@include dark-theme {
background: $color-gray-95;
}
&__page-selector {
2023-02-23 21:32:19 +00:00
padding-top: calc(24px + var(--title-bar-drag-area-height));
2021-08-18 20:08:14 +00:00
min-width: 240px;
@include light-theme {
background: $color-gray-02;
}
@include dark-theme {
background: $color-gray-80;
}
}
&__padding {
2023-04-20 17:03:43 +00:00
padding-block: 0;
padding-inline: 24px;
2021-08-18 20:08:14 +00:00
}
&__button {
@include button-reset;
@include font-body-1;
align-items: center;
display: flex;
height: 48px;
width: 100%;
2023-04-20 17:03:43 +00:00
padding-block: 14px;
padding-inline: 0;
2021-08-18 20:08:14 +00:00
&--selected {
@include light-theme {
background: $color-gray-15;
}
@include dark-theme {
background: $color-gray-65;
}
}
&:focus {
@include keyboard-mode {
background: $color-gray-05;
}
@include dark-keyboard-mode {
background: $color-gray-75;
}
}
2021-08-23 23:14:53 +00:00
&::before {
2021-08-18 20:08:14 +00:00
content: '';
display: block;
height: 22px;
2023-04-20 17:03:43 +00:00
margin-inline: 18px 14px;
2021-08-18 20:08:14 +00:00
width: 22px;
}
&--general {
@include preferences-icon(
'../images/icons/v2/settings-outline-16.svg',
'../images/icons/v2/settings-outline-16.svg'
);
}
&--appearance {
@include preferences-icon(
'../images/icons/v2/appearance-outline-24.svg',
'../images/icons/v2/appearance-solid-24.svg'
);
}
&--chats {
@include preferences-icon(
'../images/icons/v2/message-outline-24.svg',
'../images/icons/v2/message-solid-24.svg'
);
}
&--calls {
@include preferences-icon(
'../images/icons/v2/video-outline-24.svg',
'../images/icons/v2/video-solid-24.svg'
);
}
&--notifications {
@include preferences-icon(
'../images/icons/v2/bell-outline-24.svg',
'../images/icons/v2/bell-solid-24.svg'
);
}
&--privacy {
@include preferences-icon(
'../images/icons/v2/lock-outline-24.svg',
'../images/icons/v2/lock-solid-24.svg'
);
2021-08-23 23:14:53 +00:00
&::before {
2021-08-18 20:08:14 +00:00
-webkit-mask-size: 75%;
}
}
}
&__settings-pane {
height: var(--window-height);
2021-08-26 21:05:43 +00:00
overflow: overlay;
2021-08-18 20:08:14 +00:00
width: 100%;
&::-webkit-scrollbar-corner {
background: transparent;
}
2021-08-18 20:08:14 +00:00
}
&__title {
@include font-body-1-bold;
align-items: center;
display: flex;
2023-02-23 21:32:19 +00:00
height: 48px;
margin-top: var(--title-bar-drag-area-height);
margin-bottom: 24px;
2021-08-18 20:08:14 +00:00
text-align: center;
2023-02-23 21:32:19 +00:00
border-bottom: 1px solid $color-gray-15;
@include light-theme {
border-color: $color-gray-15;
}
@include dark-theme {
border-color: $color-gray-65;
}
2021-08-18 20:08:14 +00:00
&--header {
flex-grow: 1;
text-align: center;
}
}
&__settings-row {
2023-05-03 20:26:27 +00:00
border: none;
padding: 0;
2023-02-23 21:32:19 +00:00
padding-bottom: 20px;
2021-08-18 20:08:14 +00:00
h3 {
@include font-body-1-bold;
margin: 0;
margin-bottom: 8px;
}
2023-03-09 00:35:25 +00:00
&--pnp-sharing {
min-height: 185px;
}
2021-08-18 20:08:14 +00:00
}
&__settings-row:not(:last-child) {
border-bottom: 1px solid $color-gray-15;
@include light-theme {
border-color: $color-gray-15;
}
@include dark-theme {
border-color: $color-gray-65;
}
margin-bottom: 24px;
}
2023-02-23 21:32:19 +00:00
&__link {
@include button-reset;
2023-04-20 17:03:43 +00:00
padding-block: 0px 28px;
padding-inline: 0;
2023-02-23 21:32:19 +00:00
width: 100%;
h3 {
@include font-body-1;
font-weight: 400;
margin: 0;
margin-bottom: 8px;
}
}
&__link:not(:last-child) {
border-bottom: 1px solid $color-gray-15;
@include light-theme {
border-color: $color-gray-15;
}
@include dark-theme {
border-color: $color-gray-65;
}
margin-bottom: 24px;
}
2021-08-18 20:08:14 +00:00
&__control {
align-items: center;
display: flex;
justify-content: space-between;
min-height: 48px;
2023-04-20 17:03:43 +00:00
padding-block: 4px;
padding-inline: 24px;
2021-08-18 20:08:14 +00:00
&--key {
flex-grow: 1;
2023-04-20 17:03:43 +00:00
padding-inline-end: 20px;
2021-08-18 20:08:14 +00:00
}
&--value {
color: $color-gray-45;
}
&--clickable {
@include button-reset;
2023-04-20 17:03:43 +00:00
padding-block: 4px;
padding-inline: 24px;
2021-08-18 20:08:14 +00:00
width: 100%;
&:hover {
@include light-theme {
background: $color-gray-02;
}
@include dark-theme {
background: $color-gray-80;
}
}
}
}
&__checkbox {
2023-04-20 17:03:43 +00:00
padding-block: 10px;
padding-inline: 24px;
2021-08-18 20:08:14 +00:00
}
&__description {
@include font-subtitle;
@include light-theme {
color: $color-gray-60;
}
@include dark-theme {
color: $color-gray-25;
}
&--error {
color: $color-accent-red !important;
}
}
&__select {
width: 100%;
}
&__select-title {
display: block;
margin-bottom: 8px;
}
&__right-button {
display: flex;
justify-content: flex-end;
min-width: 120px;
}
&__back-icon {
@include button-reset;
display: inline-block;
height: 24px;
2023-04-20 17:03:43 +00:00
margin-inline-start: 12px;
2021-08-18 20:08:14 +00:00
min-width: 24px;
vertical-align: text-bottom;
width: 24px;
@include light-theme {
@include color-svg(
'../images/icons/v2/chevron-left-24.svg',
$color-gray-90
);
}
@include dark-theme {
@include color-svg(
'../images/icons/v2/chevron-left-24.svg',
$color-gray-02
);
}
}
2022-10-03 23:56:10 +00:00
&__stories-off {
min-width: 140px;
}
2023-02-23 21:32:19 +00:00
&__settings-radio__label {
display: flex;
flex-direction: row;
gap: 16px;
height: 40px;
align-items: center;
&:last-child {
margin-bottom: 8px;
}
}
2021-08-18 20:08:14 +00:00
}