accounts-frontend/packages/app/components/languageSwitcher/languageSwitcher.scss

229 lines
4.3 KiB
SCSS
Raw Normal View History

@import '~app/components/ui/colors.scss';
@import '~app/components/ui/fonts.scss';
@import '~app/components/ui/popup/popup.scss';
@mixin hideFooter {
2020-05-24 04:38:24 +05:30
@media (max-height: 455px) {
@content;
}
}
.boundings {
2020-05-24 04:38:24 +05:30
@include popupBounding(400px);
}
.body {
2020-05-24 04:38:24 +05:30
display: flex;
flex-direction: column;
padding: $popupPadding;
2020-05-24 04:38:24 +05:30
max-height: calc(100vh - 132px);
2020-05-24 04:38:24 +05:30
@media screen and (min-height: 630px) {
max-height: 500px;
}
}
.searchBox {
2020-05-24 04:38:24 +05:30
position: relative;
margin-bottom: 20px;
}
.searchIcon {
2020-05-24 04:38:24 +05:30
composes: search from '~app/components/ui/icons.scss';
2020-05-24 04:38:24 +05:30
position: absolute;
top: 14px;
2021-03-26 08:49:04 +05:30
inset-inline-end: 12px;
2020-05-24 04:38:24 +05:30
font-size: 22px;
color: #edebe5;
pointer-events: none; // Иконка чисто декоративная, так что клик должен проходить сквозь неё
}
$languageListBorderColor: #eee;
$languageListBorderStyle: 1px solid $languageListBorderColor;
.languagesList {
2020-05-24 04:38:24 +05:30
flex-grow: 1;
overflow-y: auto;
border-top: $languageListBorderStyle;
border-bottom: $languageListBorderStyle;
margin-bottom: 20px;
&::-webkit-scrollbar {
width: 12px;
}
&::-webkit-scrollbar-track {
background-color: #f3f3f3;
}
&::-webkit-scrollbar-thumb {
background-color: #d8d5d0;
}
@include hideFooter {
& {
margin-bottom: 0;
}
}
}
.languageItem {
2020-05-24 04:38:24 +05:30
font-family: $font-family-title;
transition: background-color 0.25s;
cursor: pointer;
overflow: hidden;
line-height: 1;
&:hover {
background-color: $whiteButtonLight;
}
}
.languageFlex {
2020-05-24 04:38:24 +05:30
box-sizing: border-box;
display: flex;
align-items: center;
padding: 10px;
border-top: $languageListBorderStyle;
.firstLanguageItem & {
border-top: none;
}
}
.languageIco {
2020-05-24 04:38:24 +05:30
display: inline-block;
2021-03-26 08:49:04 +05:30
margin-inline-end: 7px;
2020-05-24 04:38:24 +05:30
width: 40px;
height: 30px;
box-shadow: 0 0 1px rgba(#000, 0.2);
2020-05-24 04:38:24 +05:30
background: no-repeat;
background-size: cover;
}
.languageCaptions {
2020-05-24 04:38:24 +05:30
flex: 1;
overflow: hidden;
}
.languageName {
2020-05-24 04:38:24 +05:30
font-size: 15px;
margin-bottom: 2px;
}
.languageSubName {
2020-05-24 04:38:24 +05:30
font-size: 11px;
color: #ccc;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// Реализация радио кнопки. Когда у нас будет нормальный компонент радио кнопок, нужно будет перейти на него
.languageCircle {
2020-05-24 04:38:24 +05:30
composes: checkmark from '~app/components/ui/icons.scss';
2020-05-24 04:38:24 +05:30
position: relative;
box-sizing: border-box;
width: 22px;
height: 22px;
2021-03-26 08:49:04 +05:30
inset-inline-end: -32px;
2020-05-24 04:38:24 +05:30
font-size: 10px;
line-height: 18px;
text-align: center;
color: #fff;
border: 2px solid #dcd8cd;
border-radius: 50%;
2020-05-24 04:38:24 +05:30
transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
2020-05-24 04:38:24 +05:30
&:before {
opacity: 0;
transition: opacity 0.3s;
}
2020-05-24 04:38:24 +05:30
.languageItem:hover & {
2021-03-26 08:49:04 +05:30
inset-inline-end: 0;
2020-05-24 04:38:24 +05:30
}
2020-05-24 04:38:24 +05:30
.activeLanguageItem & {
border-color: $green;
background: $green;
2021-03-26 08:49:04 +05:30
inset-inline-end: 0;
2020-05-24 04:38:24 +05:30
&:before {
opacity: 1;
}
}
}
.emptyLanguagesListWrapper {
2020-05-24 04:38:24 +05:30
$transitionTime: 0.5s;
2020-05-24 04:38:24 +05:30
opacity: 0;
overflow: hidden;
transition: height $transitionTime;
2020-05-24 04:38:24 +05:30
&.emptyLanguagesListVisible {
opacity: 1;
transition: $transitionTime;
}
}
.emptyLanguagesList {
2020-05-24 04:38:24 +05:30
padding: 20px;
text-align: center;
}
.emptyLanguagesListCaption {
2020-05-24 04:38:24 +05:30
height: 20px;
max-width: 100%;
margin-bottom: 5px;
}
.emptyLanguagesListSubtitle {
2020-05-24 04:38:24 +05:30
font-family: $font-family-title;
color: #ccc;
font-size: 13px;
}
.improveTranslates {
2020-05-24 04:38:24 +05:30
border: 1px solid #dedede;
background: #f3f1ed;
padding: 10px;
display: flex;
flex-shrink: 0;
@include hideFooter {
& {
display: none;
}
}
}
.improveTranslatesIcon {
2020-05-24 04:38:24 +05:30
composes: translate from '~app/components/ui/icons.scss';
2020-05-24 04:38:24 +05:30
color: lighter($blue);
font-size: 22px;
2021-03-26 08:49:04 +05:30
margin-inline-end: 10px;
}
.improveTranslatesContent {
}
.improveTranslatesTitle {
2020-05-24 04:38:24 +05:30
font-family: $font-family-title;
font-size: 13px;
margin-bottom: 3px;
}
.improveTranslatesText {
2020-05-24 04:38:24 +05:30
font-size: 10px;
color: #9a9a9a;
line-height: 1.2;
}