signal-desktop/stylesheets/components/StoryCreator.scss

328 lines
6.2 KiB
SCSS
Raw Normal View History

2022-06-17 00:48:57 +00:00
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
.StoryCreator {
$tools-height: 44px;
@mixin svg($icon) {
2023-05-23 21:14:47 +00:00
@include color-svg('../images/icons/#{$icon}', $color-white);
2022-06-17 00:48:57 +00:00
}
background: $color-gray-95;
display: flex;
flex-direction: column;
2022-07-05 16:44:53 +00:00
width: var(--window-width);
2022-06-17 00:48:57 +00:00
height: 100vh;
2023-04-20 17:03:43 +00:00
inset-inline-start: 0;
2022-06-17 00:48:57 +00:00
position: absolute;
top: 0;
user-select: none;
z-index: $z-index-popup-overlay;
&__container {
display: flex;
flex: 1;
justify-content: center;
overflow: hidden;
padding-bottom: 0;
2023-04-20 17:03:43 +00:00
padding-block: 22px;
padding-inline: 60px;
2022-06-17 00:48:57 +00:00
position: relative;
}
&__input {
background: transparent;
border: none;
color: transparent;
position: absolute;
text-align: center;
top: 50%;
user-select: none;
&:focus {
outline: none;
}
}
&__controls {
align-items: center;
display: flex;
flex-grow: 1;
flex-wrap: wrap;
justify-content: center;
max-width: 596px;
}
&__control {
@include button-reset;
align-items: center;
border-radius: 32px;
display: inline-flex;
height: 32px;
justify-content: center;
2023-04-20 17:03:43 +00:00
margin-block: 0;
margin-inline: 15px;
2022-06-17 00:48:57 +00:00
opacity: 1;
width: 32px;
&::after {
content: ' ';
height: 24px;
width: 24px;
}
&--link::after {
2023-05-04 18:04:22 +00:00
@include color-svg('../images/icons/v3/link/link.svg', $color-white);
2022-06-17 00:48:57 +00:00
}
&--text::after {
@include color-svg('../images/icons/v2/text-24.svg', $color-white);
}
&--bg {
@include rounded-corners;
border: 1.5px solid $color-white;
display: block;
height: 24px;
padding: 2.5px;
width: 24px;
&::after {
display: none;
}
&--selected {
border-width: 4px;
padding: 0;
}
}
&--selected {
background-color: $color-white;
&::after {
background-color: $color-black;
}
}
&:hover {
background-color: $color-gray-80;
&::after {
background-color: $color-white;
}
}
}
&__toolbar {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
padding: 22px;
width: 100%;
&--buttons {
align-items: center;
display: flex;
justify-content: center;
width: 100%;
}
&--space {
height: $tools-height;
margin-bottom: 22px;
}
}
&__tools {
align-items: center;
background-color: $color-gray-90;
border-radius: 10px;
color: $color-white;
display: flex;
height: $tools-height;
justify-content: center;
margin-bottom: 22px;
2023-04-20 17:03:43 +00:00
padding-block: 14px;
padding-inline: 12px;
2022-06-17 00:48:57 +00:00
2022-07-25 18:55:44 +00:00
&__tool,
&__tool__button {
2023-04-20 17:03:43 +00:00
margin-inline-end: 14px;
2022-06-17 00:48:57 +00:00
}
&__button {
@mixin icon($icon) {
@include svg($icon);
height: 20px;
width: 20px;
border-radius: 0;
}
@include button-reset;
2023-04-20 17:03:43 +00:00
margin-block: 0;
margin-inline: 8px;
2022-06-17 00:48:57 +00:00
padding: 8px;
&--bg {
2023-05-23 21:14:47 +00:00
@include icon('v2/text-effect-on-24.svg');
2022-06-17 00:48:57 +00:00
}
&--bg-inverse {
2023-05-23 21:14:47 +00:00
@include icon('v2/text-effect-on-24.svg');
2022-06-17 00:48:57 +00:00
}
&--bg-none {
2023-05-23 21:14:47 +00:00
@include icon('v2/text-effect-off-24.svg');
2022-06-17 00:48:57 +00:00
}
2022-07-25 18:55:44 +00:00
&--font-regular__button {
2023-05-23 21:14:47 +00:00
@include icon('v3/font/font-regular-compact.svg');
2022-06-17 00:48:57 +00:00
}
2022-07-25 18:55:44 +00:00
&--font-bold__button {
2023-05-23 21:14:47 +00:00
@include icon('v3/font/font-bold-compact.svg');
2022-06-17 00:48:57 +00:00
}
2022-07-25 18:55:44 +00:00
&--font-serif__button {
2023-05-23 21:14:47 +00:00
@include icon('v3/font/font-serif-compact.svg');
2022-06-17 00:48:57 +00:00
}
2022-07-25 18:55:44 +00:00
&--font-script__button {
2023-05-23 21:14:47 +00:00
@include icon('v3/font/font-script-compact.svg');
2022-06-17 00:48:57 +00:00
}
2022-07-25 18:55:44 +00:00
&--font-condensed__button {
2023-05-23 21:14:47 +00:00
@include icon('v3/font/font-condensed-compact.svg');
2022-06-17 00:48:57 +00:00
}
}
}
&__icon {
&--font-regular {
2023-05-23 21:14:47 +00:00
@include svg('v3/font/font-regular-compact.svg');
2022-06-17 00:48:57 +00:00
}
&--font-bold {
2023-05-23 21:14:47 +00:00
@include svg('v3/font/font-bold-compact.svg');
2022-06-17 00:48:57 +00:00
}
&--font-serif {
2023-05-23 21:14:47 +00:00
@include svg('v3/font/font-serif-compact.svg');
2022-06-17 00:48:57 +00:00
}
&--font-script {
2023-05-23 21:14:47 +00:00
@include svg('v3/font/font-script-compact.svg');
2022-06-17 00:48:57 +00:00
}
&--font-condensed {
2023-05-23 21:14:47 +00:00
@include svg('v3/font/font-condensed-compact.svg');
2022-06-17 00:48:57 +00:00
}
}
&__bg {
@include button-reset;
@include rounded-corners;
border: 2px solid transparent;
height: 24px;
margin: 4px;
width: 24px;
&--selected {
border: 2px solid $color-white;
}
}
&__popper {
background: $color-gray-80;
border-radius: 10px;
margin-bottom: 18px;
padding: 8px;
width: 144px;
&__arrow {
2023-04-20 17:03:43 +00:00
border-inline-start: 14px solid transparent;
border-inline-end: 14px solid transparent;
2022-06-17 00:48:57 +00:00
border-top: 14px solid $color-gray-80;
2023-04-20 17:03:43 +00:00
@include position-absolute-center-x;
2022-06-17 00:48:57 +00:00
bottom: -14px;
height: 0;
width: 0;
}
}
&__link-preview-input-popper {
display: flex;
flex-direction: column;
2022-11-02 21:04:50 +00:00
min-height: 256px;
2022-06-17 00:48:57 +00:00
padding: 16px;
width: 360px;
}
&__link-preview-input__container {
margin-top: 0;
}
&__link-preview-container {
align-items: center;
display: flex;
flex-direction: column;
flex: 1;
justify-content: center;
}
2022-11-02 21:04:50 +00:00
&__link-preview-wrapper {
transform: scale(0.5);
}
2022-06-17 00:48:57 +00:00
&__link-preview-button {
margin-top: 18px;
margin-bottom: 8px;
}
&__link-preview {
background: $color-black-alpha-40;
border-radius: 16px;
display: flex;
padding: 14px;
width: 100%;
&__image {
border-radius: 8px;
height: 76px;
width: 76px;
}
&__meta {
display: flex;
flex-direction: column;
justify-content: center;
2023-04-20 17:03:43 +00:00
margin-inline-start: 14px;
2022-06-17 00:48:57 +00:00
}
&__title {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
@include font-body-1-bold;
color: $color-white;
display: -webkit-box;
overflow: hidden;
user-select: none;
}
&__location {
@include font-subtitle;
color: $color-white-alpha-60;
}
}
&__link-preview-empty {
align-items: center;
color: $color-gray-45;
display: flex;
flex-direction: column;
&__icon {
2023-05-04 18:04:22 +00:00
@include color-svg('../images/icons/v3/link/link.svg', $color-gray-45);
height: 20px;
width: 20px;
2022-06-17 00:48:57 +00:00
}
}
&__emoji-button,
&__emoji-button::after {
height: 20px;
width: 20px;
}
2022-06-17 00:48:57 +00:00
}