2021-11-10 16:44:57 +01:00
|
|
|
/*
|
|
|
|
Copyright 2021 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_MPollBody {
|
|
|
|
margin-top: 8px;
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: $font-15px;
|
|
|
|
line-height: $font-24px;
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 8px;
|
2022-02-15 09:52:51 +01:00
|
|
|
|
|
|
|
.mx_MPollBody_edited {
|
|
|
|
color: $roomtopic-color;
|
|
|
|
font-size: $font-12px;
|
|
|
|
opacity: 0.6;
|
|
|
|
}
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
h2::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
content: "";
|
2021-11-10 16:44:57 +01:00
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 12px;
|
|
|
|
top: 3px;
|
|
|
|
left: 3px;
|
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
|
|
|
background-color: $secondary-content;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-position: center;
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/room/composer/poll.svg");
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MPollBody_option {
|
|
|
|
border: 1px solid $quinary-content;
|
|
|
|
border-radius: 8px;
|
|
|
|
margin-bottom: 16px;
|
2021-12-08 15:56:48 +01:00
|
|
|
padding: 6px 12px;
|
2021-11-10 16:44:57 +01:00
|
|
|
max-width: 550px;
|
|
|
|
background-color: $background;
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_StyledRadioButton,
|
|
|
|
.mx_MPollBody_endedOption {
|
2021-11-10 16:44:57 +01:00
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_StyledRadioButton_content,
|
|
|
|
.mx_MPollBody_endedOption {
|
2021-11-10 16:44:57 +01:00
|
|
|
padding-top: 2px;
|
2021-12-08 15:56:48 +01:00
|
|
|
margin-right: 0px;
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
|
2021-11-23 12:16:31 +01:00
|
|
|
.mx_StyledRadioButton_spacer {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MPollBody_optionDescription {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.mx_MPollBody_optionVoteCount {
|
|
|
|
color: $secondary-content;
|
|
|
|
font-size: $font-12px;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MPollBody_popularityBackground {
|
2021-12-08 15:56:48 +01:00
|
|
|
width: 100%;
|
2021-11-10 16:44:57 +01:00
|
|
|
height: 8px;
|
|
|
|
margin-right: 12px;
|
|
|
|
border-radius: 8px;
|
|
|
|
background-color: $system;
|
|
|
|
|
|
|
|
.mx_MPollBody_popularityAmount {
|
|
|
|
width: 0%;
|
|
|
|
height: 8px;
|
|
|
|
border-radius: 8px;
|
|
|
|
background-color: $quaternary-content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MPollBody_option:last-child {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MPollBody_option_checked {
|
2021-11-11 15:34:55 +01:00
|
|
|
border-color: $accent;
|
2021-11-23 11:27:44 +01:00
|
|
|
|
|
|
|
.mx_MPollBody_popularityBackground {
|
|
|
|
.mx_MPollBody_popularityAmount {
|
|
|
|
background-color: $accent;
|
|
|
|
}
|
|
|
|
}
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* options not actionable in these states */
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_MPollBody_option_checked,
|
|
|
|
.mx_MPollBody_option_ended {
|
2022-02-18 11:43:07 +01:00
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2022-12-12 12:24:14 +01:00
|
|
|
.mx_StyledRadioButton_checked,
|
|
|
|
.mx_MPollBody_endedOptionWinner {
|
2021-12-08 15:56:48 +01:00
|
|
|
input[type="radio"] + div {
|
|
|
|
border-width: 2px;
|
|
|
|
border-color: $accent;
|
|
|
|
background-color: $accent;
|
2022-12-12 12:24:14 +01:00
|
|
|
background-image: url("$(res)/img/element-icons/check-white.svg");
|
2021-12-08 15:56:48 +01:00
|
|
|
background-size: 12px;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: center;
|
|
|
|
|
|
|
|
div {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2021-11-10 16:44:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-08 15:56:48 +01:00
|
|
|
.mx_MPollBody_endedOptionWinner .mx_MPollBody_optionDescription .mx_MPollBody_optionVoteCount::before {
|
2022-12-12 12:24:14 +01:00
|
|
|
content: "";
|
2021-12-08 15:56:48 +01:00
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 4px;
|
|
|
|
top: 2px;
|
|
|
|
height: 12px;
|
|
|
|
width: 12px;
|
|
|
|
background-color: $accent;
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-position: center;
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/element-icons/trophy.svg");
|
2021-12-08 15:56:48 +01:00
|
|
|
}
|
|
|
|
|
2021-11-10 16:44:57 +01:00
|
|
|
.mx_MPollBody_totalVotes {
|
|
|
|
color: $secondary-content;
|
|
|
|
font-size: $font-12px;
|
|
|
|
}
|
|
|
|
}
|
2021-12-09 13:54:31 +01:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Prevent clicking a poll within a reply */
|
2021-12-09 13:54:31 +01:00
|
|
|
.mx_ReplyTile .mx_MPollBody {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2022-02-18 11:43:07 +01:00
|
|
|
|
|
|
|
.mx_MPollBody_option,
|
2022-07-27 15:39:29 +02:00
|
|
|
/* label has cursor: default in user-agent stylesheet */
|
|
|
|
/* override */
|
2022-02-18 11:43:07 +01:00
|
|
|
.mx_MPollBody_live-option {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|