Display started polls in timeline (without votes) (behind labs setting) (#7088)
* Display started polls in timeline (without votes) * Update i18n info * Keep original background colour of poll options, even on hover * Show full avatar above a poll message
This commit is contained in:
parent
8ea551fb6d
commit
431b69ee49
9 changed files with 229 additions and 5 deletions
|
@ -182,6 +182,7 @@
|
|||
@import "./views/messages/_MImageReplyBody.scss";
|
||||
@import "./views/messages/_MJitsiWidgetEvent.scss";
|
||||
@import "./views/messages/_MNoticeBody.scss";
|
||||
@import "./views/messages/_MPollBody.scss";
|
||||
@import "./views/messages/_MStickerBody.scss";
|
||||
@import "./views/messages/_MTextBody.scss";
|
||||
@import "./views/messages/_MVideoBody.scss";
|
||||
|
|
109
res/css/views/messages/_MPollBody.scss
Normal file
109
res/css/views/messages/_MPollBody.scss
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
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;
|
||||
}
|
||||
|
||||
h2::before {
|
||||
content: '';
|
||||
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;
|
||||
mask-image: url('$(res)/img/element-icons/room/composer/poll.svg');
|
||||
}
|
||||
|
||||
.mx_MPollBody_option {
|
||||
border: 1px solid $quinary-content;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 16px;
|
||||
padding: 6px;
|
||||
max-width: 550px;
|
||||
background-color: $background;
|
||||
|
||||
.mx_StyledRadioButton {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mx_StyledRadioButton_content {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.mx_MPollBody_optionVoteCount {
|
||||
position: absolute;
|
||||
color: $secondary-content;
|
||||
right: 4px;
|
||||
font-size: $font-12px;
|
||||
}
|
||||
|
||||
.mx_MPollBody_popularityBackground {
|
||||
width: calc(100% - 4px);
|
||||
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 {
|
||||
border-color: $accent-color;
|
||||
}
|
||||
|
||||
.mx_StyledRadioButton_checked input[type="radio"] + div {
|
||||
border-width: 2px;
|
||||
border-color: $accent-color;
|
||||
background-color: $accent-color;
|
||||
background-image: url('$(res)/img/element-icons/check-white.svg');
|
||||
background-size: 12px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
||||
div {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MPollBody_totalVotes {
|
||||
color: $secondary-content;
|
||||
font-size: $font-12px;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue