element-web/res/css/views/elements/_Slider.scss

108 lines
2.3 KiB
SCSS
Raw Normal View History

2020-04-16 12:33:23 +03:00
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
2020-04-21 13:01:52 +03:00
.mx_Slider {
2020-04-16 12:33:23 +03:00
position: relative;
margin: 0px;
2020-04-22 17:37:46 +03:00
flex-grow: 1;
2020-04-16 12:33:23 +03:00
}
2020-04-21 13:01:52 +03:00
.mx_Slider_dotContainer {
2020-04-16 12:33:23 +03:00
display: flex;
flex-direction: row;
justify-content: space-between;
}
2020-04-21 13:01:52 +03:00
.mx_Slider_bar {
2020-04-16 12:33:23 +03:00
display: flex;
box-sizing: border-box;
position: absolute;
height: 1em;
2020-04-16 12:33:23 +03:00
width: 100%;
padding: 0 0.5em; // half the width of a dot.
2020-04-16 12:33:23 +03:00
align-items: center;
}
2020-04-21 13:01:52 +03:00
.mx_Slider_bar > hr {
2020-04-16 12:33:23 +03:00
width: 100%;
2020-05-20 15:07:33 +03:00
height: 0.4em;
background-color: $slider-background-color;
border: 0;
2020-04-16 12:33:23 +03:00
}
2020-04-21 13:01:52 +03:00
.mx_Slider_selection {
2020-04-16 12:33:23 +03:00
display: flex;
align-items: center;
width: calc(100% - 1em); // 2 * half the width of a dot
height: 1em;
2020-04-16 12:33:23 +03:00
position: absolute;
2020-05-20 15:07:33 +03:00
pointer-events: none;
2020-04-16 12:33:23 +03:00
}
2020-04-21 13:01:52 +03:00
.mx_Slider_selectionDot {
2020-04-16 12:33:23 +03:00
position: absolute;
width: $slider-selection-dot-size;
height: $slider-selection-dot-size;
Color cleanup number six (#7050) * Remove $voip-decline-color and $voip-accept-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove $dialog-background-bg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $mention-user-pill-bg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $plinth-bg-color -> $secondary-accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-lighter-fg-color -> $input-darker-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-valid-border-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-invalid-border-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $avatar-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $preview-widget-fg-color -> $greyed-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $settings-profile-button-fg-color -> $settings-profile-overlay-placeholder-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $presence-online -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $pinned-unread-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $event-highlight-fg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $tab-label-active-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-primary-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-danger-bg-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-link-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $togglesw-on-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $slider-selection-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $progressbar-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $authpage-body-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix second merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-11-08 14:50:53 +03:00
background-color: $accent-color;
2020-04-16 12:33:23 +03:00
border-radius: 50%;
z-index: 10;
}
.mx_Slider_selectionText {
color: $muted-fg-color;
font-size: $font-14px;
position: relative;
text-align: center;
top: 30px;
width: 100%;
}
2020-04-21 13:01:52 +03:00
.mx_Slider_selection > hr {
2020-04-16 12:33:23 +03:00
margin: 0;
Color cleanup number six (#7050) * Remove $voip-decline-color and $voip-accept-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove $dialog-background-bg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $mention-user-pill-bg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $plinth-bg-color -> $secondary-accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-lighter-fg-color -> $input-darker-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-valid-border-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-invalid-border-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $avatar-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $preview-widget-fg-color -> $greyed-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $settings-profile-button-fg-color -> $settings-profile-overlay-placeholder-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $presence-online -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $pinned-unread-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $event-highlight-fg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $tab-label-active-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-primary-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-danger-bg-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-link-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $togglesw-on-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $slider-selection-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $progressbar-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $authpage-body-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix second merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-11-08 14:50:53 +03:00
border: 0.2em solid $accent-color;
2020-04-16 12:33:23 +03:00
}
2020-04-21 13:01:52 +03:00
.mx_Slider_dot {
height: $slider-dot-size;
width: $slider-dot-size;
2020-04-16 12:33:23 +03:00
border-radius: 50%;
2020-05-06 19:25:54 +03:00
background-color: $slider-background-color;
2020-04-16 12:33:23 +03:00
z-index: 0;
}
2020-04-21 13:01:52 +03:00
.mx_Slider_dotActive {
Color cleanup number six (#7050) * Remove $voip-decline-color and $voip-accept-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove $dialog-background-bg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $mention-user-pill-bg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $plinth-bg-color -> $secondary-accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-lighter-fg-color -> $input-darker-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-valid-border-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $input-invalid-border-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $avatar-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $preview-widget-fg-color -> $greyed-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $settings-profile-button-fg-color -> $settings-profile-overlay-placeholder-fg-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $presence-online -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $pinned-unread-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $event-highlight-fg-color -> $warning-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $tab-label-active-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-primary-bg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-danger-bg-color -> $notice-primary-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $button-link-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $togglesw-on-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $slider-selection-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $progressbar-fg-color -> $accent-color Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * $authpage-body-bg-color -> $background Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix second merge issue Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-11-08 14:50:53 +03:00
background-color: $accent-color;
2020-04-16 12:33:23 +03:00
}
2020-04-21 13:01:52 +03:00
.mx_Slider_dotValue {
2020-04-16 12:33:23 +03:00
display: flex;
flex-direction: column;
align-items: center;
2020-05-06 19:25:54 +03:00
color: $slider-background-color;
2020-04-16 14:09:36 +03:00
}
2020-04-22 13:36:23 +03:00
// The following is a hack to center the labels without adding
// any width to the slider's dots.
.mx_Slider_labelContainer {
width: 1em;
2020-04-22 13:36:23 +03:00
}
.mx_Slider_label {
position: relative;
width: fit-content;
left: -50%;
}