signal-desktop/stylesheets/components/SafetyTipsModal.scss

230 lines
4.6 KiB
SCSS
Raw Normal View History

2024-03-12 16:29:31 +00:00
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2024-11-15 23:09:31 +00:00
@use '../mixins';
@use '../variables';
2024-03-12 16:29:31 +00:00
$SafetyTipsModal__paddingInline: 32px;
$SafetyTipsModal__paddingBlock: 24px;
.SafetyTipsModal {
.module-Modal__headerTitle {
align-items: start;
}
.module-Modal__title {
padding-top: 20px;
2024-11-15 23:09:31 +00:00
@include mixins.font-title-1;
2024-03-12 16:29:31 +00:00
text-align: center;
}
.module-Modal__body {
padding-inline: 0;
}
.module-Modal__button-footer {
padding-block: $SafetyTipsModal__paddingBlock;
padding-inline: $SafetyTipsModal__paddingInline;
}
}
.SafetyTipsModal__width-container {
max-width: 420px;
width: 95%;
}
.SafetyTipsModal__Description {
margin: 0;
padding-inline: $SafetyTipsModal__paddingInline;
padding-bottom: 24px;
text-align: center;
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1;
@include mixins.light-theme {
color: variables.$color-gray-60;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-25;
2024-03-12 16:29:31 +00:00
}
}
.SafetyTipsModal__Footer {
display: flex;
gap: 16px;
}
.SafetyTipsModal__Button {
flex: 1;
}
.SafetyTipsModal__Button--Previous {
&,
&:is(:disabled, [aria-disabled='true']) {
2024-11-15 23:09:31 +00:00
@include mixins.any-theme {
2024-03-12 16:29:31 +00:00
background: transparent;
}
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
color: variables.$color-accent-blue;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-white;
2024-03-12 16:29:31 +00:00
}
}
&:is(:disabled, [aria-disabled='true']) {
opacity: 0.5;
}
&:not(:disabled):not([aria-disabled='true']) {
&:hover,
&:focus {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-gray-15;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-65;
2024-03-12 16:29:31 +00:00
}
}
&:active {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-gray-20;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-60;
2024-03-12 16:29:31 +00:00
}
}
}
}
.SafetyTipsModal__CardWrapper {
display: flex;
flex-direction: row;
gap: $SafetyTipsModal__paddingInline;
overflow: hidden;
scroll-snap-type: x mandatory;
padding-inline: $SafetyTipsModal__paddingInline;
}
.SafetyTipsModal__Card {
width: 100%;
flex-shrink: 0;
scroll-snap-align: center;
padding-block: 14px 32px;
padding-inline: 12px;
border-radius: 18px;
text-align: center;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-gray-02;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-75;
2024-03-12 16:29:31 +00:00
}
}
.SafetyTipsModal__CardImage {
width: 100%;
height: auto;
vertical-align: top;
border-radius: 12px;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
2024-03-12 16:29:31 +00:00
background: white;
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-65;
2024-03-12 16:29:31 +00:00
}
}
.SafetyTipsModal__CardTitle {
margin-block: 14px 0;
2024-11-15 23:09:31 +00:00
@include mixins.font-title-2;
@include mixins.light-theme {
color: variables.$color-gray-90;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-05;
2024-03-12 16:29:31 +00:00
}
}
.SafetyTipsModal__CardDescription {
margin-block: 8px 0;
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1;
@include mixins.light-theme {
color: variables.$color-gray-62;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-20;
2024-03-12 16:29:31 +00:00
}
}
.SafetyTipsModal__Dots {
display: flex;
justify-content: center;
padding-block: 24px 20px;
}
.SafetyTipsModal__DotsButton {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset;
& {
padding: 4px;
}
2024-03-12 16:29:31 +00:00
&::before {
content: '';
display: block;
width: 8px;
height: 8px;
border-radius: 9999px;
transition: background 100ms ease;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: rgba(variables.$color-black, 30%);
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: rgba(variables.$color-white, 30%);
2024-03-12 16:29:31 +00:00
}
}
&:not([aria-current]) {
&:hover,
&:focus {
&::before {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: rgba(variables.$color-black, 45%);
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: rgba(variables.$color-white, 45%);
2024-03-12 16:29:31 +00:00
}
}
}
}
&[aria-current]::before {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-black;
2024-03-12 16:29:31 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-white;
2024-03-12 16:29:31 +00:00
}
}
&:focus {
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
2024-03-12 16:29:31 +00:00
&::before {
2024-07-24 00:31:40 +00:00
box-shadow:
2024-11-15 23:09:31 +00:00
0 0 0 2px variables.$color-white,
0 0 0 4px variables.$color-accent-blue;
2024-03-12 16:29:31 +00:00
}
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-keyboard-mode {
2024-03-12 16:29:31 +00:00
&::before {
2024-07-24 00:31:40 +00:00
box-shadow:
2024-11-15 23:09:31 +00:00
0 0 0 2px variables.$color-gray-80,
0 0 0 4px variables.$color-accent-blue;
2024-03-12 16:29:31 +00:00
}
}
}
}
.SafetyTipsModal__DotsButtonLabel {
2024-11-15 23:09:31 +00:00
@include mixins.sr-only;
2024-03-12 16:29:31 +00:00
}